mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-11 06:31:01 -07:00
test(core): fix config mocks in client and web-fetch tests
This commit is contained in:
@@ -118,6 +118,8 @@ describe('BaseLlmClient', () => {
|
||||
.mockReturnValue(createAvailabilityServiceMock()),
|
||||
setActiveModel: vi.fn(),
|
||||
getUserTier: vi.fn().mockReturnValue(undefined),
|
||||
getRetryFetchErrors: vi.fn().mockReturnValue(true),
|
||||
getMaxAttempts: vi.fn().mockReturnValue(3),
|
||||
getModel: vi.fn().mockReturnValue('test-model'),
|
||||
getActiveModel: vi.fn().mockReturnValue('test-model'),
|
||||
} as unknown as Mocked<Config>;
|
||||
|
||||
@@ -234,6 +234,8 @@ describe('Gemini Client (client.ts)', () => {
|
||||
getDirectories: vi.fn().mockReturnValue(['/test/dir']),
|
||||
}),
|
||||
getGeminiClient: vi.fn(),
|
||||
getRetryFetchErrors: vi.fn().mockReturnValue(true),
|
||||
getMaxAttempts: vi.fn().mockReturnValue(3),
|
||||
getModelRouterService: vi
|
||||
.fn()
|
||||
.mockReturnValue(mockRouterService as unknown as ModelRouterService),
|
||||
|
||||
@@ -248,6 +248,7 @@ describe('WebFetchTool', () => {
|
||||
getProxy: vi.fn(),
|
||||
getGeminiClient: mockGetGeminiClient,
|
||||
getRetryFetchErrors: vi.fn().mockReturnValue(false),
|
||||
getMaxAttempts: vi.fn().mockReturnValue(3),
|
||||
getDirectWebFetch: vi.fn().mockReturnValue(false),
|
||||
modelConfigService: {
|
||||
getResolvedConfig: vi.fn().mockImplementation(({ model }) => ({
|
||||
|
||||
Reference in New Issue
Block a user