Skip to content

Commit 5c8d100

Browse files
committed
fixup! test: add opt-in process WPT runner
1 parent 5e8ea43 commit 5c8d100

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

test/parallel/test-common-wpt-backends.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ async function collect(backend, throws) {
7777
}
7878

7979
async function compare(throws) {
80-
const thread = await collect('thread', throws);
81-
const child = await collect('process', throws);
80+
// Compared as a set: an uncaught error reaches the runner over a different
81+
// channel than the results do, so it can overtake them on the thread
82+
// backend. The runner acts on each of these independently.
83+
const thread = (await collect('thread', throws)).sort();
84+
const child = (await collect('process', throws)).sort();
8285
assert.notStrictEqual(thread.length, 0);
8386
assert.deepStrictEqual(thread, child);
8487
return thread;
@@ -99,7 +102,7 @@ function runDriver(driver, spec, backend) {
99102

100103
async function main() {
101104
const completed = await compare(false);
102-
assert.deepStrictEqual(completed.slice().sort(), [
105+
assert.deepStrictEqual(completed, [
103106
'completion 0',
104107
'result 0 passes',
105108
'result 0 passes asynchronously',

0 commit comments

Comments
 (0)