MCPcopy Index your code
hub / github.com/nodejs/node / test

Function test

test/parallel/test-child-process-fork-stdio-string-variant.js:20–30  ·  view source on GitHub ↗
(stringVariant)

Source from the content-addressed store, hash-verified

18 { code: 'ERR_INVALID_ARG_VALUE', name: 'TypeError' });
19
20function test(stringVariant) {
21 const child = fork(childScript, { stdio: stringVariant });
22
23 child.on('message', common.mustCall((message) => {
24 assert.deepStrictEqual(message, { foo: 'bar' });
25 }));
26
27 child.send(payload);
28
29 child.on('exit', common.mustCall((code) => assert.strictEqual(code, 0)));
30}
31
32['pipe', 'inherit', 'ignore'].forEach(test);

Callers

nothing calls this directly

Calls 3

forkFunction · 0.70
sendMethod · 0.65
onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…