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

Function createSpawnSpy

packages/engine/src/utils/runFfmpeg.test.ts:62–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60});
61
62function createSpawnSpy() {
63 const calls: Array<{ command: string; args: string[] }> = [];
64 const spawn = vi.fn((command: string, args: string[]) => {
65 calls.push({ command, args });
66 const proc = new EventEmitter() as EventEmitter & {
67 stderr: EventEmitter;
68 kill: ReturnType<typeof vi.fn>;
69 killed: boolean;
70 };
71 proc.stderr = new EventEmitter();
72 proc.kill = vi.fn();
73 proc.killed = false;
74 process.nextTick(() => proc.emit("close", 0));
75 return proc;
76 });
77 return { spawn, calls };
78}
79
80describe("runFfmpeg binary resolution", () => {
81 const originalFfmpegPath = process.env.HYPERFRAMES_FFMPEG_PATH;

Callers 1

runFfmpeg.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected