MCPcopy Create free account
hub / github.com/EvoMap/evolver / fakeSpawn

Function fakeSpawn

test/autoDistillConv.test.js:15–21  ·  view source on GitHub ↗
(emit, counter, exitCode)

Source from the content-addressed store, hash-verified

13 return JSON.stringify({ type: 'result', is_error: false, result: JSON.stringify(geneObj) });
14}
15function fakeSpawn(emit, counter, exitCode) {
16 return (bin, args, opts) => {
17 if (counter) counter.n++;
18 const code = `process.stdout.write(${JSON.stringify(emit)}); process.exit(${exitCode || 0});`;
19 return spawn(process.execPath, ['-e', code], { ...opts });
20 };
21}
22const GOOD_GENE = {
23 type: 'Gene', id: 'gene_distilled_publish-feishu-doc', category: 'innovate',
24 signals_match: ['publish_feishu', 'feishu_doc', 'lark_doc'],

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected