(newEnv)
| 7 | process.emitWarning('foo'); |
| 8 | } else { |
| 9 | function test(newEnv) { |
| 10 | const [cmd, opts] = common.escapePOSIXShell`"${process.execPath}" "${__filename}" child`; |
| 11 | |
| 12 | cp.exec(cmd, { ...opts, env: { ...opts?.env, ...newEnv } }, common.mustCall((err, stdout, stderr) => { |
| 13 | assert.strictEqual(err, null); |
| 14 | assert.strictEqual(stdout, ''); |
| 15 | |
| 16 | if (newEnv.NODE_NO_WARNINGS === '1') |
| 17 | assert.strictEqual(stderr, ''); |
| 18 | else |
| 19 | assert.match(stderr.trim(), /Warning: foo\n/); |
| 20 | })); |
| 21 | } |
| 22 | |
| 23 | test({}); |
| 24 | test(process.env); |
no test coverage detected
searching dependent graphs…