Skip to content

Commit c85fa56

Browse files
Y-RyuZUclaude
andcommitted
test: fix ftb-quest-logic tests after profileDirectory validation
- Add useAppStore mock to provide profileDirectory in tests - Update expected minecraftDir values from empty string to '/test/modpack' - Ensures all 161 Jest tests pass after Code Rabbit improvements 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 65f982a commit c85fa56

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/lib/services/__tests__/ftb-quest-logic.e2e.test.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ import { invoke } from '@tauri-apps/api/core';
1515
jest.mock('@tauri-apps/api/core');
1616
const mockInvoke = invoke as jest.MockedFunction<typeof invoke>;
1717

18+
// Mock app store
19+
jest.mock('@/lib/store', () => ({
20+
useAppStore: {
21+
getState: () => ({
22+
profileDirectory: '/test/modpack'
23+
})
24+
}
25+
}));
26+
1827
// Mock file system operations
1928
const mockFileSystem = {
2029
'/test/modpack/kubejs/assets/kubejs/lang/en_us.json': JSON.stringify({
@@ -218,7 +227,7 @@ describe('FTB Quest Translation Logic E2E', () => {
218227

219228
// Verify batch translation summary was updated
220229
expect(mockInvoke).toHaveBeenCalledWith('batch_update_translation_summary', {
221-
minecraftDir: '',
230+
minecraftDir: '/test/modpack',
222231
sessionId,
223232
targetLanguage,
224233
entries: expect.arrayContaining([
@@ -519,7 +528,7 @@ describe('FTB Quest Translation Logic E2E', () => {
519528

520529
// Verify batch translation summary was updated
521530
expect(mockInvoke).toHaveBeenCalledWith('batch_update_translation_summary', {
522-
minecraftDir: '',
531+
minecraftDir: '/test/modpack',
523532
sessionId,
524533
targetLanguage,
525534
entries: expect.arrayContaining([

0 commit comments

Comments
 (0)