We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9308eb7 commit f331312Copy full SHA for f331312
test/core.js
@@ -285,9 +285,14 @@ test(
285
} catch (error) {
286
const exception = /** @type {ErrnoException} */ (error)
287
if (!nodeBefore18) {
288
- assert.equal(
289
- exception.code,
290
- 'ERR_INVALID_URL',
+ assert(exception.code)
+ // To do: when pulling in new Node changes, the code is now
+ // `ERR_UNSUPPORTED_RESOLVE_REQUEST` (from around Node 21.7).
291
+ // Earlier was `ERR_INVALID_URL`.
292
+ assert.ok(
293
+ ['ERR_UNSUPPORTED_RESOLVE_REQUEST', 'ERR_INVALID_URL'].includes(
294
+ exception.code
295
+ ),
296
'should not be able to resolve relative to a `data:` parent url'
297
)
298
}
0 commit comments