summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/parallel/test-tracing-no-crash.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/parallel/test-tracing-no-crash.js b/test/parallel/test-tracing-no-crash.js
new file mode 100644
index 0000000000..816bd95df0
--- /dev/null
+++ b/test/parallel/test-tracing-no-crash.js
@@ -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));