diff --git a/test/parallel/test-worker-broadcastchannel-wpt.js b/test/parallel/test-worker-broadcastchannel-wpt.js index 4997eda4228c99..972d8fb6e0d3b8 100644 --- a/test/parallel/test-worker-broadcastchannel-wpt.js +++ b/test/parallel/test-worker-broadcastchannel-wpt.js @@ -27,7 +27,7 @@ const { // dispatching algorithm under the covers. What's not // immediately clear is whether the ordering is spec // mandated. In this test, c1 should receive events - // first, then c2, then c3. In the Node.js non-Windows dispatching + // first, then c2, then c3. In the Node.js dispatching // algorithm this means the ordering is: // from c3 (c1 from c3) // done (c1 from c2) @@ -36,7 +36,7 @@ const { // from c1 (c3 from c1) // done (c3 from c2) // - // Whereas in Windows and in the browser-ordering (as illustrated in the + // Whereas in the browser-ordering (as illustrated in the // Web Platform Tests) it would be: // from c1 (c2 from c1) // from c1 (c3 from c1) @@ -56,14 +56,9 @@ const { doneCount++; if (doneCount === 2) { assert.strictEqual(events.length, 6); - if (common.isWindows) { - assert.strictEqual(events[0].data, 'from c1'); - assert.strictEqual(events[2].data, 'from c1'); - assert.strictEqual(events[3].data, 'from c3'); - assert.strictEqual(events[3].data, 'from c3'); - assert.strictEqual(events[5].data, 'done'); - assert.strictEqual(events[5].data, 'done'); - } else { + // TODO: Don't skip Windows once ordering is fixed per comment above. + // Right now, the ordering for Windows is unreliable. + if (!common.isWindows) { assert.strictEqual(events[0].data, 'from c3'); assert.strictEqual(events[1].data, 'done'); assert.strictEqual(events[2].data, 'from c1'); @@ -132,7 +127,6 @@ const { { // TODO: Fix failure on Windows CI. Skipping for now. if (!common.isWindows) { - // Closing a channel in onmessage prevents already queued tasks // from firing onmessage events const c1 = new BroadcastChannel('close-in-onmessage2').unref();