MCPcopy
hub / github.com/coder/mux / createTestBashTool

Function createTestBashTool

src/node/services/tools/bash.test.ts:33–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31// Returns both tool and disposable temp directory
32// Use with: using testEnv = createTestBashTool();
33function createTestBashTool() {
34 const tempDir = new TestTempDir("test-bash");
35 const config = createTestToolConfig(process.cwd());
36 config.runtimeTempDir = tempDir.path; // Override runtimeTempDir to use test's disposable temp dir
37 const tool = createBashTool(config);
38
39 return {
40 tool,
41 [Symbol.dispose]() {
42 tempDir[Symbol.dispose]();
43 },
44 };
45}
46
47describe("buildBashToolDescription", () => {
48 const cwd = "/workspace/root";

Callers 1

bash.test.tsFile · 0.85

Calls 2

createTestToolConfigFunction · 0.90
createBashToolFunction · 0.90

Tested by

no test coverage detected