mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
test: add tracing crash regression test
PR-URL: https://github.com/nodejs/node/pull/21867 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
This commit is contained in:
1 parent
281e5a3cee
commit
55623b5ba0
1 file changed
+14
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const { spawn } = require('child_process');
|
||||
|
||||
function CheckNoSignalAndErrorCodeOne(code, signal) {
|
||||
assert.strictEqual(null, signal);
|
||||
assert.strictEqual(1, code);
|
||||
}
|
||||
|
||||
const child = spawn(process.execPath,
|
||||
['--trace-event-categories', 'madeup', '-e',
|
||||
'throw new Error()'], { stdio: 'inherit' });
|
||||
child.on('exit', common.mustCall(CheckNoSignalAndErrorCodeOne));
|
||||
Reference in new issue
Block a user