From 52ebe0f83ad05d77e34946fda9d23dcc77c2bc9c Mon Sep 17 00:00:00 2001 From: Qingyu Deng Date: Tue, 17 Aug 2021 21:56:36 +0800 Subject: [PATCH] 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 Reviewed-By: Bradley Farias Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- test/fixtures/worker-script.ts | 0 ...test-worker-load-file-with-extension-other-than-js.js | 9 +++++++++ 2 files changed, 9 insertions(+) create mode 100644 test/fixtures/worker-script.ts create mode 100644 test/parallel/test-worker-load-file-with-extension-other-than-js.js diff --git a/test/fixtures/worker-script.ts b/test/fixtures/worker-script.ts new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/parallel/test-worker-load-file-with-extension-other-than-js.js b/test/parallel/test-worker-load-file-with-extension-other-than-js.js new file mode 100644 index 00000000000..5dca297576b --- /dev/null +++ b/test/parallel/test-worker-load-file-with-extension-other-than-js.js @@ -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')); +}))();