mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
a8f6c563e6
PR-URL: https://github.com/nodejs/node/pull/43751
Refs: 22698d2676
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
12 lines
388 B
JavaScript
12 lines
388 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { Worker } = require('worker_threads');
|
|
|
|
// Regression for https://github.com/nodejs/node/issues/43182.
|
|
const w = new Worker(new URL('data:text/javascript,process.exit(1);await new Promise(()=>{ process.exit(2); })'));
|
|
w.on('exit', common.mustCall((code) => {
|
|
assert.strictEqual(code, 1);
|
|
}));
|