diff options
| author | matt korwel <[email protected]> | 2025-06-19 16:52:22 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-19 16:52:22 -0700 |
| commit | 04518b52c0ddcd5ae1192763c55e472add218b3c (patch) | |
| tree | 2587b0ccc5460e9e94eb8b715956cb713950f7c8 /packages/cli/src/ui/App.test.tsx | |
| parent | c48fcaa8c3fe8175718b1bbfc7770a958012173c (diff) | |
Auth First Run (#1207)
Co-authored-by: Tommaso Sciortino <[email protected]>
Co-authored-by: N. Taylor Mullen <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/App.test.tsx')
| -rw-r--r-- | packages/cli/src/ui/App.test.tsx | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/packages/cli/src/ui/App.test.tsx b/packages/cli/src/ui/App.test.tsx index 0ebaa34d..dca24b5c 100644 --- a/packages/cli/src/ui/App.test.tsx +++ b/packages/cli/src/ui/App.test.tsx @@ -145,6 +145,15 @@ vi.mock('./hooks/useGeminiStream', () => ({ })), })); +vi.mock('./hooks/useAuthCommand', () => ({ + useAuthCommand: vi.fn(() => ({ + isAuthDialogOpen: false, + openAuthDialog: vi.fn(), + handleAuthSelect: vi.fn(), + handleAuthHighlight: vi.fn(), + })), +})); + vi.mock('./hooks/useLogger', () => ({ useLogger: vi.fn(() => ({ getPreviousUserMessages: vi.fn().mockResolvedValue([]), @@ -176,7 +185,9 @@ describe('App UI', () => { }; const workspaceSettingsFile: SettingsFile = { path: '/workspace/.gemini/settings.json', - settings, + settings: { + ...settings, + }, }; return new LoadedSettings(userSettingsFile, workspaceSettingsFile, []); }; @@ -184,10 +195,6 @@ describe('App UI', () => { beforeEach(() => { const ServerConfigMocked = vi.mocked(ServerConfig, true); mockConfig = new ServerConfigMocked({ - contentGeneratorConfig: { - apiKey: 'test-key', - model: 'test-model', - }, embeddingModel: 'test-embedding-model', sandbox: undefined, targetDir: '/test/dir', @@ -197,7 +204,7 @@ describe('App UI', () => { showMemoryUsage: false, sessionId: 'test-session-id', cwd: '/tmp', - // Provide other required fields for ConfigParameters if necessary + model: 'model', }) as unknown as MockServerConfig; // Ensure the getShowMemoryUsage mock function is specifically set up if not covered by constructor mock |
