(options?: { cwd?: string })
| 17 | // Helper to create file_read tool with test configuration |
| 18 | // Returns both tool and disposable temp directory |
| 19 | function createTestFileReadTool(options?: { cwd?: string }) { |
| 20 | const tempDir = new TestTempDir("test-file-read"); |
| 21 | const config = createTestToolConfig(options?.cwd ?? process.cwd()); |
| 22 | config.runtimeTempDir = tempDir.path; // Override runtimeTempDir to use test's disposable temp dir |
| 23 | const tool = createFileReadTool(config); |
| 24 | |
| 25 | return { |
| 26 | tool, |
| 27 | runtimeTempDir: tempDir.path, |
| 28 | [Symbol.dispose]() { |
| 29 | tempDir[Symbol.dispose](); |
| 30 | }, |
| 31 | }; |
| 32 | } |
| 33 | |
| 34 | describe("file_read tool", () => { |
| 35 | let testDir: string; |
no test coverage detected