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

Function mockExecOk

src/node/services/coderService.test.ts:40–42  ·  view source on GitHub ↗
(stdout: string, stderr = "")

Source from the content-addressed store, hash-verified

38}
39
40function mockExecOk(stdout: string, stderr = ""): void {
41 execFileAsyncSpy?.mockReturnValue(createMockExecResult(Promise.resolve({ stdout, stderr })));
42}
43
44function mockExecError(error: Error): void {
45 execFileAsyncSpy?.mockReturnValue(createMockExecResult(Promise.reject(error)));

Callers 1

Calls 2

resolveMethod · 0.80
createMockExecResultFunction · 0.70

Tested by

no test coverage detected