MCPcopy
hub / github.com/simstudioai/sim / createReadyProc

Function createReadyProc

apps/sim/lib/execution/isolated-vm.test.ts:47–64  ·  view source on GitHub ↗
(result: unknown)

Source from the content-addressed store, hash-verified

45}
46
47function createReadyProc(result: unknown): MockProc {
48 const proc = createBaseProc()
49 proc.send = (message: unknown) => {
50 const msg = message as { type?: string; executionId?: number }
51 if (msg.type === 'execute') {
52 setImmediate(() => {
53 proc.emit('message', {
54 type: 'result',
55 executionId: msg.executionId,
56 result: { result, stdout: '' },
57 })
58 })
59 }
60 return true
61 }
62 setImmediate(() => proc.emit('message', { type: 'ready' }))
63 return proc
64}
65
66function createReadyProcWithDelay(delayMs: number): MockProc {
67 const proc = createBaseProc()

Callers 1

Calls 1

createBaseProcFunction · 0.85

Tested by

no test coverage detected