mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 22:56:06 +00:00

PR-URL: https://github.com/nodejs/node/pull/23502 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
15 lines
488 B
JavaScript
15 lines
488 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { spawn } = require('child_process');
|
|
|
|
function CheckNoSignalAndErrorCodeOne(code, signal) {
|
|
assert.strictEqual(signal, null);
|
|
assert.strictEqual(code, 1);
|
|
}
|
|
|
|
const child = spawn(process.execPath,
|
|
['--trace-event-categories', 'madeup', '-e',
|
|
'throw new Error()'], { stdio: 'inherit' });
|
|
child.on('exit', common.mustCall(CheckNoSignalAndErrorCodeOne));
|