(stringVariant)
| 18 | { code: 'ERR_INVALID_ARG_VALUE', name: 'TypeError' }); |
| 19 | |
| 20 | function 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); |