MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / createSpawnSpy

Function createSpawnSpy

packages/engine/src/services/chunkEncoder.test.ts:74–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72}
73
74function createSpawnSpy(): {
75 spawn: (command: string, args: readonly string[]) => FakeProc;
76 calls: SpawnCall[];
77} {
78 const calls: SpawnCall[] = [];
79 const spawn = (command: string, args: readonly string[]): FakeProc => {
80 const proc = createFakeProc();
81 calls.push({ command, args, proc });
82 return proc;
83 };
84 return { spawn, calls };
85}
86
87function emitClose(proc: FakeProc, code: number): void {
88 proc.emit("exit", code);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected