test: add test to verify other extension can be loaded by worker

PR-URL: https://github.com/nodejs/node/pull/39788
Fixes: https://github.com/nodejs/node/issues/39124
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Qingyu Deng 2021-08-17 21:56:36 +08:00 committed by James M Snell
parent 23b704858f
commit 52ebe0f83a
No known key found for this signature in database
GPG Key ID: 7341B15C070877AC
2 changed files with 9 additions and 0 deletions

0
test/fixtures/worker-script.ts vendored Normal file
View File

View File

@ -0,0 +1,9 @@
'use strict';
const common = require('../common');
const fixtures = require('../common/fixtures');
const { Worker } = require('worker_threads');
(common.mustCall(() => {
new Worker(fixtures.path('worker-script.ts'));
}))();