test: fix missing getAllowedTools mock in gemini.tsx tests

This commit is contained in:
Abhijit Balaji
2026-02-03 15:07:43 -08:00
parent ba48dd04b4
commit b8eb13ea1f
2 changed files with 4 additions and 0 deletions

View File

@@ -538,6 +538,7 @@ describe('gemini.tsx main function kitty protocol', () => {
const mockConfig = createMockConfig({
isInteractive: () => false,
getAllowedTools: vi.fn(),
getQuestion: () => '',
getSandbox: () => undefined,
getListExtensions: () => flag === 'listExtensions',
@@ -614,6 +615,7 @@ describe('gemini.tsx main function kitty protocol', () => {
const mockConfig = createMockConfig({
isInteractive: () => false,
getAllowedTools: vi.fn(),
getQuestion: () => '',
getSandbox: () => ({ command: 'docker', image: 'test-image' }),
});

View File

@@ -78,6 +78,7 @@ vi.mock('./config/config.js', () => ({
getQuestion: vi.fn(() => ''),
isInteractive: () => false,
storage: { initialize: vi.fn().mockResolvedValue(undefined) },
getAllowedTools: vi.fn(),
} as unknown as Config),
parseArguments: vi.fn().mockResolvedValue({}),
isDebugMode: vi.fn(() => false),
@@ -188,6 +189,7 @@ describe('gemini.tsx main function cleanup', () => {
} as any); // eslint-disable-line @typescript-eslint/no-explicit-any
vi.mocked(loadCliConfig).mockResolvedValue({
isInteractive: vi.fn(() => false),
getAllowedTools: vi.fn(),
getQuestion: vi.fn(() => 'test'),
getSandbox: vi.fn(() => false),
getDebugMode: vi.fn(() => false),