Skip to content

Commit c2372ea

Browse files
eugeneotargos
authored andcommitted
test: add tracing crash regression test
PR-URL: #21867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
1 parent 00c33a5 commit c2372ea

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
const common = require('../common');
3+
const assert = require('assert');
4+
const { spawn } = require('child_process');
5+
6+
function CheckNoSignalAndErrorCodeOne(code, signal) {
7+
assert.strictEqual(null, signal);
8+
assert.strictEqual(1, code);
9+
}
10+
11+
const child = spawn(process.execPath,
12+
['--trace-event-categories', 'madeup', '-e',
13+
'throw new Error()'], { stdio: 'inherit' });
14+
child.on('exit', common.mustCall(CheckNoSignalAndErrorCodeOne));

0 commit comments

Comments
 (0)