mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-27 21:44:25 -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 {
|
export interface AppRigOptions {
|
||||||
fakeResponsesPath?: string;
|
fakeResponsesPath?: string;
|
||||||
terminalWidth?: number;
|
terminalWidth?: number;
|
||||||
|
|||||||
@@ -202,6 +202,10 @@ vi.mock('../utils/events.js');
|
|||||||
vi.mock('../utils/handleAutoUpdate.js');
|
vi.mock('../utils/handleAutoUpdate.js');
|
||||||
vi.mock('./utils/ConsolePatcher.js');
|
vi.mock('./utils/ConsolePatcher.js');
|
||||||
vi.mock('../utils/cleanup.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 { useHistory } from './hooks/useHistoryManager.js';
|
||||||
import { useThemeCommand } from './hooks/useThemeCommand.js';
|
import { useThemeCommand } from './hooks/useThemeCommand.js';
|
||||||
|
|||||||
@@ -1799,7 +1799,6 @@ export const useGeminiStream = (
|
|||||||
addItem,
|
addItem,
|
||||||
registerBackgroundShell,
|
registerBackgroundShell,
|
||||||
consumeUserHint,
|
consumeUserHint,
|
||||||
config,
|
|
||||||
isLowErrorVerbosity,
|
isLowErrorVerbosity,
|
||||||
maybeAddSuppressedToolErrorNote,
|
maybeAddSuppressedToolErrorNote,
|
||||||
maybeAddLowVerbosityFailureNote,
|
maybeAddLowVerbosityFailureNote,
|
||||||
|
|||||||
Reference in New Issue
Block a user