diff options
Diffstat (limited to 'packages/cli/src/ui/App.test.tsx')
| -rw-r--r-- | packages/cli/src/ui/App.test.tsx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/cli/src/ui/App.test.tsx b/packages/cli/src/ui/App.test.tsx index fef4106a..13ddb77d 100644 --- a/packages/cli/src/ui/App.test.tsx +++ b/packages/cli/src/ui/App.test.tsx @@ -152,6 +152,9 @@ vi.mock('@google/gemini-cli-core', async (importOriginal) => { getSessionId: vi.fn(() => 'test-session-id'), getUserTier: vi.fn().mockResolvedValue(undefined), getIdeMode: vi.fn(() => false), + getWorkspaceContext: vi.fn(() => ({ + getDirectories: vi.fn(() => []), + })), }; }); @@ -292,6 +295,13 @@ describe('App UI', () => { // Ensure a theme is set so the theme dialog does not appear. mockSettings = createMockSettings({ workspace: { theme: 'Default' } }); + + // Ensure getWorkspaceContext is available if not added by the constructor + if (!mockConfig.getWorkspaceContext) { + mockConfig.getWorkspaceContext = vi.fn(() => ({ + getDirectories: vi.fn(() => ['/test/dir']), + })); + } vi.mocked(ideContext.getIdeContext).mockReturnValue(undefined); }); |
