Skip to content

Commit ccc39ae

Browse files
worker: fix the broken test case
1 parent b06c9bb commit ccc39ae

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎test/parallel/test-worker-broadcastchannel.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,10 @@ assert.throws(() => new BroadcastChannel(), {
199199
});
200200
`, { eval: true });
201201

202+
const threadId = worker.threadId;
203+
202204
bc.onworkerexited = common.mustCall((event) => {
203-
assert.strictEqual(event.data.threadId, worker.threadId);
205+
assert.strictEqual(event.data.threadId, threadId);
204206
assert.strictEqual(event.data.exitCode, 42);
205207

206208
bc.close();

0 commit comments

Comments
 (0)