Skip to content
Closed
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
fixup! vm: do not overwrite error when creating context
  • Loading branch information
addaleax committed Feb 15, 2019
commit 5d74e49b8bc712828442036fc72d31fd34b7cac7
4 changes: 3 additions & 1 deletion test/parallel/test-worker-vm-context-terminate.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const { Worker } = require('worker_threads');
if (!process.env.HAS_STARTED_WORKER) {
process.env.HAS_STARTED_WORKER = 1;
const w = new Worker(__filename);
setTimeout(() => w.terminate(), 50);
w.on('online', common.mustCall(() => {
setTimeout(() => w.terminate(), 50);
}));
w.on('error', common.mustNotCall());
w.on('exit', common.mustCall((code) => assert.strictEqual(code, 1)));
} else {
Expand Down