diff options
Diffstat (limited to 'packages/cli/src/ui/commands/restoreCommand.test.ts')
| -rw-r--r-- | packages/cli/src/ui/commands/restoreCommand.test.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/cli/src/ui/commands/restoreCommand.test.ts b/packages/cli/src/ui/commands/restoreCommand.test.ts index 23f71499..b9ecc139 100644 --- a/packages/cli/src/ui/commands/restoreCommand.test.ts +++ b/packages/cli/src/ui/commands/restoreCommand.test.ts @@ -39,7 +39,10 @@ describe('restoreCommand', () => { mockConfig = { getCheckpointingEnabled: vi.fn().mockReturnValue(true), - getProjectTempDir: vi.fn().mockReturnValue(geminiTempDir), + storage: { + getProjectTempCheckpointsDir: vi.fn().mockReturnValue(checkpointsDir), + getProjectTempDir: vi.fn().mockReturnValue(geminiTempDir), + }, getGeminiClient: vi.fn().mockReturnValue({ setHistory: mockSetHistory, }), @@ -77,7 +80,9 @@ describe('restoreCommand', () => { describe('action', () => { it('should return an error if temp dir is not found', async () => { - vi.mocked(mockConfig.getProjectTempDir).mockReturnValue(''); + vi.mocked( + mockConfig.storage.getProjectTempCheckpointsDir, + ).mockReturnValue(''); expect( await restoreCommand(mockConfig)?.action?.(mockContext, ''), @@ -219,7 +224,7 @@ describe('restoreCommand', () => { describe('completion', () => { it('should return an empty array if temp dir is not found', async () => { - vi.mocked(mockConfig.getProjectTempDir).mockReturnValue(''); + vi.mocked(mockConfig.storage.getProjectTempDir).mockReturnValue(''); const command = restoreCommand(mockConfig); expect(await command?.completion?.(mockContext, '')).toEqual([]); |
