MCPcopy Create free account
hub / github.com/cloudflare/moltworker / createMockExecResult

Function createMockExecResult

src/test-utils.ts:38–51  ·  view source on GitHub ↗
(
  stdout: string = '',
  options: { exitCode?: number; stderr?: string; success?: boolean } = {},
)

Source from the content-addressed store, hash-verified

36}
37
38export function createMockExecResult(
39 stdout: string = '',
40 options: { exitCode?: number; stderr?: string; success?: boolean } = {},
41): ExecResult {
42 return {
43 stdout,
44 stderr: options.stderr ?? '',
45 exitCode: options.exitCode ?? 0,
46 success: options.success ?? (options.exitCode ?? 0) === 0,
47 command: '',
48 duration: 0,
49 timestamp: new Date().toISOString(),
50 };
51}
52
53export interface MockSandbox {
54 sandbox: Sandbox;

Callers 2

process.test.tsFile · 0.90
createMockSandboxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected