MCPcopy Index your code
hub / github.com/coder/mux / createTestFileReadTool

Function createTestFileReadTool

src/node/services/tools/file_read.test.ts:19–32  ·  view source on GitHub ↗
(options?: { cwd?: string })

Source from the content-addressed store, hash-verified

17// Helper to create file_read tool with test configuration
18// Returns both tool and disposable temp directory
19function 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
34describe("file_read tool", () => {
35 let testDir: string;

Callers 1

file_read.test.tsFile · 0.85

Calls 2

createTestToolConfigFunction · 0.90
createFileReadToolFunction · 0.90

Tested by

no test coverage detected