diff options
| author | Yuki Okita <[email protected]> | 2025-07-31 05:38:20 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-30 20:38:20 +0000 |
| commit | c1fe6889569610878c45216556fb99424b5bcba4 (patch) | |
| tree | b96f5f66bc00426fcd3e4b87402067342abbce12 /packages/core/src/tools/tool-registry.test.ts | |
| parent | 21965f986c8aa99da5a0f8e52ae823bb2f040d7a (diff) | |
feat: Multi-Directory Workspace Support (part1: add `--include-directories` option) (#4605)
Co-authored-by: Allen Hutchison <[email protected]>
Diffstat (limited to 'packages/core/src/tools/tool-registry.test.ts')
| -rw-r--r-- | packages/core/src/tools/tool-registry.test.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/core/src/tools/tool-registry.test.ts b/packages/core/src/tools/tool-registry.test.ts index b3fdd7a3..27a7c28b 100644 --- a/packages/core/src/tools/tool-registry.test.ts +++ b/packages/core/src/tools/tool-registry.test.ts @@ -30,6 +30,9 @@ import { Schema, } from '@google/genai'; import { spawn } from 'node:child_process'; +import fs from 'node:fs'; + +vi.mock('node:fs'); // Use vi.hoisted to define the mock function so it can be used in the vi.mock factory const mockDiscoverMcpTools = vi.hoisted(() => vi.fn()); @@ -144,6 +147,10 @@ describe('ToolRegistry', () => { let mockConfigGetToolDiscoveryCommand: ReturnType<typeof vi.spyOn>; beforeEach(() => { + vi.mocked(fs.existsSync).mockReturnValue(true); + vi.mocked(fs.statSync).mockReturnValue({ + isDirectory: () => true, + } as fs.Stats); config = new Config(baseConfigParams); toolRegistry = new ToolRegistry(config); vi.spyOn(console, 'warn').mockImplementation(() => {}); |
