We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3d8893 commit 0046b9aCopy full SHA for 0046b9a
test/parallel/test-worker-process-exit-async-module.js
@@ -0,0 +1,11 @@
1
+'use strict';
2
+
3
+const common = require('../common');
4
+const assert = require('assert');
5
+const { Worker } = require('worker_threads');
6
7
+// Regression for https://github.com/nodejs/node/issues/43182.
8
+const w = new Worker(new URL('data:text/javascript,process.exit(1);await new Promise(()=>{ process.exit(2); })'));
9
+w.on('exit', common.mustCall((code) => {
10
+ assert.strictEqual(code, 1);
11
+}));
0 commit comments