mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-12 07:01:09 -07:00
fix: resolve preflight test timeouts and warnings
Mock shouldPromptForTerminalSetup in test environments to prevent action-required UI interruptions. Remove unnecessary dependency in useGeminiStream hook.
This commit is contained in:
@@ -131,6 +131,11 @@ vi.mock('../ui/components/GeminiRespondingSpinner.js', async () => {
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock('../ui/utils/terminalSetup.js', () => ({
|
||||
shouldPromptForTerminalSetup: vi.fn().mockResolvedValue(false),
|
||||
useTerminalSetupPrompt: vi.fn(),
|
||||
}));
|
||||
|
||||
export interface AppRigOptions {
|
||||
fakeResponsesPath?: string;
|
||||
terminalWidth?: number;
|
||||
|
||||
@@ -202,6 +202,10 @@ vi.mock('../utils/events.js');
|
||||
vi.mock('../utils/handleAutoUpdate.js');
|
||||
vi.mock('./utils/ConsolePatcher.js');
|
||||
vi.mock('../utils/cleanup.js');
|
||||
vi.mock('./utils/terminalSetup.js', () => ({
|
||||
shouldPromptForTerminalSetup: vi.fn().mockResolvedValue(false),
|
||||
useTerminalSetupPrompt: vi.fn(),
|
||||
}));
|
||||
|
||||
import { useHistory } from './hooks/useHistoryManager.js';
|
||||
import { useThemeCommand } from './hooks/useThemeCommand.js';
|
||||
|
||||
@@ -1799,7 +1799,6 @@ export const useGeminiStream = (
|
||||
addItem,
|
||||
registerBackgroundShell,
|
||||
consumeUserHint,
|
||||
config,
|
||||
isLowErrorVerbosity,
|
||||
maybeAddSuppressedToolErrorNote,
|
||||
maybeAddLowVerbosityFailureNote,
|
||||
|
||||
Reference in New Issue
Block a user