Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
make windows shell happy
  • Loading branch information
bmeck committed Aug 2, 2019
commit 46294fe57be30dc5cdf5a1baa9f480edddcc8119
3 changes: 3 additions & 0 deletions test/fixtures/worker-from-argv.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use strict';
const {Worker} = require('worker_threads');
new Worker(process.argv[2]).on('exit', process.exit);
8 changes: 4 additions & 4 deletions test/parallel/test-preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const fixtureC = fixtures.path('printC.js');
const fixtureD = fixtures.path('define-global.js');
const fixtureE = fixtures.path('intrinsic-mutation.js');
const fixtureF = fixtures.path('print-intrinsic-mutation-name.js');
const fixtureG = fixtures.path('worker-from-argv.js');
const fixtureThrows = fixtures.path('throws_error4.js');

// Test preloading a single module works
Expand Down Expand Up @@ -76,15 +77,14 @@ childProcess.exec(
assert.strictEqual(stdout, 'smoosh\n');
}
);
const workerSrc = `'new (require("worker_threads").Worker)("${fixtureF}");'`;
childProcess.exec(
`"${
nodeBinary
}" --frozen-intrinsics ${
preloadOption([fixtureE])
}-e ${
workerSrc
}`,
} ${
fixtureG
} ${fixtureF}`,
function(err, stdout) {
assert.ifError(err);
assert.strictEqual(stdout, 'smoosh\n');
Expand Down