Skip to content

Commit a4203f4

Browse files
authored
Merge pull request #59 from moorestech/feature/add-test
テストの追加とマスター機能を追加
2 parents d224f1e + 195e801 commit a4203f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+12626
-181
lines changed

.claude/settings.local.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,22 @@
66
"Bash(npm run dev:*)",
77
"Bash(npm run tauri:build:*)",
88
"Bash(npm run build:*)",
9+
"Bash(npm:*)",
910
"mcp__playwright__browser_navigate",
1011
"mcp__playwright__browser_click",
1112
"mcp__playwright__browser_snapshot",
1213
"mcp__playwright__browser_close",
1314
"mcp__playwright__browser_wait_for",
1415
"Bash(ls:*)",
1516
"Bash(cat:*)",
16-
"Bash(find:*)"
17+
"Bash(find:*)",
18+
"Bash(npm run test:*)",
19+
"Bash(npm test:*)",
20+
"Bash(grep:*)",
21+
"Bash(npx vitest run:*)",
22+
"Bash(npx c8 report:*)",
23+
"Bash(rg:*)",
24+
"Bash(npx tsc:*)"
1725
]
1826
},
1927
"enableAllProjectMcpServers": false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npm:*)",
5+
"Bash(npx:*)",
6+
"Bash(npm run test:*)",
7+
"Bash(grep:*)"
8+
],
9+
"deny": []
10+
}
11+
}

frontend/coverage-output.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
3+
> vitest run --run --coverage
4+
5+
6+
RUN v3.2.4 /Users/katsumi.sato/WebstormProjects/CommandForgeEditor/frontend
7+
Coverage enabled with v8
8+
9+
✓ src/utils/commandDefaults.test.ts (17 tests) 5ms
10+
✓ src/components/dnd/DropZone.test.tsx (10 tests) 54ms
11+
✓ src/components/dnd/DraggableCommand.test.tsx (10 tests) 181ms
12+
✓ src/store/skitStore.test.ts (20 tests) 33ms
13+
✓ src/components/skit/ValidationLog.test.tsx (10 tests) 78ms
14+
✓ src/components/skit/CommandList.test.tsx (2 tests | 1 skipped) 302ms
15+
✓ CommandList > renders commands when a skit is selected 300ms
16+
✓ src/components/skit/CommandEditor.test.tsx (25 tests) 949ms
17+
✓ src/components/skit/Toolbar.test.tsx (20 tests) 1589ms
18+
✓ Toolbar > should disable buttons when no skit is selected 491ms
19+
stdout | src/utils/fileSystem.test.ts > fileSystem > loadSkits > should create skits directory if not exists
20+
Created skits directory at /project/skits
21+
22+
✓ src/utils/devFileSystem.test.ts (10 tests) 7ms
23+
✓ src/utils/commandFormatting.test.ts (19 tests) 4ms
24+
✓ src/utils/fileSystem.test.ts (26 tests) 31ms
25+
✓ src/utils/reservedCommands.test.ts (9 tests) 7ms
26+
✓ src/utils/validation.test.ts (19 tests) 87ms
27+
28+
Test Files 1 failed | 13 passed (14)
29+
Tests 196 passed | 1 skipped (197)
30+
Start at 10:50:57
31+
Duration 6.77s (transform 1.35s, setup 5.06s, collect 5.17s, tests 3.33s, environment 19.65s, prepare 2.88s)
32+

frontend/coverage.json

Lines changed: 5 additions & 0 deletions
Large diffs are not rendered by default.

frontend/coverage_final.txt

Lines changed: 671 additions & 0 deletions
Large diffs are not rendered by default.

frontend/coverage_output.txt

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
2+
3+
> vitest run --coverage --run
4+
5+
6+
RUN v3.2.4 /Users/katsumi.sato/WebstormProjects/CommandForgeEditor/frontend
7+
Coverage enabled with v8
8+
9+
❯ src/i18n/translationLoader.test.ts (22 tests | 1 failed) 28ms
10+
✓ translationLoader > loadTranslations > should load development translations when not in Tauri environment 3ms
11+
✓ translationLoader > loadTranslations > should handle fetch errors in development mode 1ms
12+
✓ translationLoader > loadTranslations > should load translations from Tauri filesystem 0ms
13+
✓ translationLoader > loadTranslations > should fallback to development mode when commands path not found 0ms
14+
✓ translationLoader > loadTranslations > should handle missing i18n directory 0ms
15+
✓ translationLoader > loadTranslations > should handle JSON parse errors 0ms
16+
✓ translationLoader > loadTranslations > should skip non-existent language files 0ms
17+
✓ translationLoader > loadTranslations > should handle development mode even with __TAURI__ present 1ms
18+
✓ translationLoader > generateCommandTranslationKeys > should generate basic command translation keys 0ms
19+
✓ translationLoader > generateCommandTranslationKeys > should generate property translation keys 1ms
20+
✓ translationLoader > generateCommandTranslationKeys > should generate enum translation keys 0ms
21+
✓ translationLoader > generateCommandTranslationKeys > should handle commands without properties 2ms
22+
✓ translationLoader > getAvailableLanguages > should return available languages from i18n resource store 0ms
23+
✓ translationLoader > getAvailableLanguages > should use language code as fallback name 0ms
24+
✓ translationLoader > getTranslationWithFallback > should return translation when available 0ms
25+
✓ translationLoader > getTranslationWithFallback > should return fallback when translation equals key 0ms
26+
✓ translationLoader > getTranslationWithFallback > should return key when no translation and no fallback 0ms
27+
✓ translationLoader > getTranslationWithFallback > should handle non-string translations 0ms
28+
✓ translationLoader > getTranslationWithFallback > should pass options to i18n.t 0ms
29+
✓ translationLoader > getTranslationWithFallback > should return key when translation is non-string and no fallback 0ms
30+
× translationLoader > loadDevelopmentTranslations error handling > should handle errors when loading development translations 16ms
31+
→ expected "error" to be called with arguments: [ …(2) ]
32+
33+
Number of calls: 0
34+

35+
✓ translationLoader > loadTranslations production error handling > should handle general error and fallback to development translations 1ms
36+
✓ src/components/dnd/SortableItem.test.tsx (13 tests) 239ms
37+
✓ src/components/layout/LanguageSwitcher.test.tsx (12 tests) 412ms
38+
✓ src/components/layout/MainLayout.test.tsx (19 tests) 263ms
39+
✓ src/App.test.tsx (11 tests | 2 skipped) 449ms
40+
✓ src/components/skit/CommandList.test.tsx (21 tests | 1 skipped) 551ms
41+
✓ src/components/skit/SkitList.test.tsx (16 tests) 1404ms
42+
✓ src/components/skit/Toolbar.test.tsx (20 tests) 1617ms
43+
✓ Toolbar > should disable buttons when no skit is selected 373ms
44+
✓ src/components/skit/CommandEditor.test.tsx (25 tests) 1563ms
45+
✓ CommandEditor > should handle boolean property changes 373ms
46+
✓ src/store/skitStore.test.ts (46 tests) 98ms
47+
✓ src/main.test.tsx (8 tests | 2 skipped) 191ms
48+
✓ src/components/dnd/DraggableCommand.test.tsx (10 tests) 399ms
49+
✓ src/components/dnd/DropZone.test.tsx (10 tests) 107ms
50+
✓ src/components/skit/ValidationLog.test.tsx (10 tests) 131ms
51+
✓ src/components/dnd/DndProvider.test.tsx (13 tests) 46ms
52+
✓ src/components/dnd/SortableList.test.tsx (13 tests) 112ms
53+
stdout | src/utils/fileSystem.test.ts > fileSystem > loadSkits > should create skits directory if not exists
54+
Created skits directory at /project/skits
55+
56+
✓ src/hooks/use-mobile.test.tsx (12 tests) 40ms
57+
✓ src/utils/fileSystem.test.ts (29 tests) 38ms
58+
✓ src/hooks/useKeyboardShortcuts.test.ts (19 tests | 1 skipped) 81ms
59+
✓ src/hooks/useToast.test.ts (13 tests) 26ms
60+
✓ src/hooks/use-toast.test.ts (20 tests) 36ms
61+
✓ src/hooks/useCommandTranslation.test.ts (14 tests) 28ms
62+
✓ src/hooks/useDndSortable.test.ts (13 tests) 25ms
63+
✓ src/utils/validation.test.ts (22 tests) 49ms
64+
✓ src/lib/utils.test.ts (22 tests) 12ms
65+
✓ src/i18n/config.test.ts (14 tests) 12ms
66+
✓ src/utils/reservedCommands.test.ts (9 tests) 4ms
67+
✓ src/utils/devFileSystem.test.ts (10 tests) 7ms
68+
✓ src/utils/commandDefaults.test.ts (17 tests) 4ms
69+
✓ src/utils/commandFormatting.test.ts (19 tests) 3ms
70+
71+
Test Files 1 failed | 29 passed (30)
72+
Tests 1 failed | 495 passed | 6 skipped (502)
73+
Start at 16:27:25
74+
Duration 9.72s (transform 2.41s, setup 8.97s, collect 10.80s, tests 7.98s, environment 33.14s, prepare 5.33s)
75+

0 commit comments

Comments
 (0)