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

Function withRuntimeWorkspace

tests/runtime/runtime.test.ts:156–162  ·  view source on GitHub ↗
(
        run: (runtime: Runtime, workspace: TestWorkspace) => Promise<T>
      )

Source from the content-addressed store, hash-verified

154 ) => execBuffered(runtime, command, { cwd: workspace.path, timeout: 30, ...options });
155
156 const withRuntimeWorkspace = async <T>(
157 run: (runtime: Runtime, workspace: TestWorkspace) => Promise<T>
158 ): Promise<T> => {
159 const runtime = createRuntime();
160 await using workspace = await TestWorkspace.create(runtime, type);
161 return await run(runtime, workspace);
162 };
163
164 describe("exec() - Command execution", () => {
165 testForRuntime("captures stdout and stderr separately", async () => {

Callers 1

runtime.test.tsFile · 0.85

Calls 3

createRuntimeFunction · 0.70
createMethod · 0.65
runFunction · 0.50

Tested by

no test coverage detected