mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-12 20:37:08 -07:00
fix(test): adapt useGeminiStream and config tests to latest main interfaces
This commit is contained in:
@@ -1472,7 +1472,7 @@ describe('Approval mode tool exclusion logic', () => {
|
||||
await expect(
|
||||
loadCliConfig(settings, 'test-session', invalidArgv as CliArgs),
|
||||
).rejects.toThrow(
|
||||
'Invalid approval mode: invalid_mode. Valid values are: auto_edit, plan, default ',
|
||||
'Invalid approval mode: invalid_mode. Valid values are: auto_edit, plan, default',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -106,7 +106,12 @@ const MockedGeminiClientClass = vi.hoisted(() =>
|
||||
);
|
||||
|
||||
const MockedUserPromptEvent = vi.hoisted(() =>
|
||||
vi.fn().mockImplementation(() => {}),
|
||||
vi
|
||||
.fn()
|
||||
.mockImplementation(() => ({
|
||||
toLogBody: vi.fn(),
|
||||
toOpenTelemetryAttributes: vi.fn(),
|
||||
})),
|
||||
);
|
||||
const mockParseAndFormatApiError = vi.hoisted(() => vi.fn());
|
||||
const mockIsBackgroundExecutionData = vi.hoisted(
|
||||
@@ -2323,7 +2328,6 @@ describe('useGeminiStream', () => {
|
||||
});
|
||||
|
||||
describe('handleApprovalModeChange', () => {
|
||||
|
||||
it('should only auto-approve edit tools when switching to AUTO_EDIT mode', async () => {
|
||||
const awaitingApprovalToolCalls: TrackedToolCall[] = [
|
||||
createMockToolCall('replace', 'call1', 'edit'),
|
||||
|
||||
Reference in New Issue
Block a user