mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 17:32:22 +00:00

Otherwise, it looks like a `null` exception is being thrown. PR-URL: https://github.com/nodejs/node/pull/26130 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
11 lines
409 B
JavaScript
11 lines
409 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const fixtures = require('../common/fixtures');
|
|
const assert = require('assert');
|
|
const { Worker } = require('worker_threads');
|
|
|
|
const w = new Worker(fixtures.path('es-modules/import-process-exit.mjs'),
|
|
{ execArgv: ['--experimental-modules'] });
|
|
w.on('error', common.mustNotCall());
|
|
w.on('exit', (code) => assert.strictEqual(code, 42));
|