Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion test/wpt/runner/runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export class WPTRunner extends EventEmitter {
`skipped: ${skipped}`
)

process.exit(0)
process.exit(failed - expectedFailures ? 1 : process.exitCode)
}

addInitScript (code) {
Expand Down
9 changes: 9 additions & 0 deletions test/wpt/runner/worker.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { WebSocket } from '../../../lib/websocket/websocket.js'
import { Cache } from '../../../lib/cache/cache.js'
import { CacheStorage } from '../../../lib/cache/cachestorage.js'
import { kConstruct } from '../../../lib/cache/symbols.js'
import { webcrypto } from 'node:crypto'

const { initScripts, meta, test, url, path } = workerData

Expand Down Expand Up @@ -92,6 +93,14 @@ Object.defineProperties(globalThis, {
}
})

// TODO: remove once node 18 is dropped
if (!globalThis.crypto) {
Object.defineProperty(globalThis, 'crypto', {
...globalPropertyDescriptors,
value: webcrypto
})
}

// self is required by testharness
// GLOBAL is required by self
runInThisContext(`
Expand Down
13 changes: 12 additions & 1 deletion test/wpt/status/fetch.status.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,14 @@
"skip": true
},
"scheme-blob.sub.any.js": {
"note": "fails everywhere",
"note": "fail: fails everywhere, flaky: only node 18",
"fail": [
"Fetching URL.createObjectURL(invalid_type_blob) is OK"
],
"flaky": [
"Fetching URL.createObjectURL(empty_blob) is OK",
"Fetching URL.createObjectURL(empty_type_blob) is OK",
"Fetching URL.createObjectURL(empty_data_blob) is OK"
]
},
"status.h2.any.js": {
Expand Down Expand Up @@ -417,6 +422,12 @@
"note": "this is a bug in webstreams, see https://github.com/nodejs/node/issues/46786",
"skip": true
}
},
"idlharness.any.js": {
"note": "https://github.com/nodejs/undici/issues/1666#issuecomment-1275177704",
"fail": [
"Window interface: operation fetch(RequestInfo, optional RequestInit)"
]
}
},
"content-length": {
Expand Down