mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
test: skip url WPT subtests instead of modifying test script
Signed-off-by: Filip Skokan <panva.ip@gmail.com> PR-URL: https://github.com/nodejs/node/pull/62635 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
4dc18ef29d
commit
4dba22f367
3 files changed
+25
-26
No files matched your search
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
'historical.any.js': {
|
||||
'fail': {
|
||||
'expected': [
|
||||
'searchParams on location object',
|
||||
],
|
||||
},
|
||||
},
|
||||
'javascript-urls.window.js': {
|
||||
'skip': 'requires document.body reference',
|
||||
},
|
||||
'percent-encoding.window.js': {
|
||||
'skip': 'requires document.body reference',
|
||||
},
|
||||
'toascii.window.js': {
|
||||
'skipTests': [
|
||||
/\(using <a(rea)?>/,
|
||||
],
|
||||
},
|
||||
'url-setters-a-area.window.js': {
|
||||
'skip': 'already tested in url-setters.any.js',
|
||||
},
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"historical.any.js": {
|
||||
"fail": {
|
||||
"expected": [
|
||||
"searchParams on location object"
|
||||
]
|
||||
}
|
||||
},
|
||||
"javascript-urls.window.js": {
|
||||
"skip": "requires document.body reference"
|
||||
},
|
||||
"percent-encoding.window.js": {
|
||||
"skip": "TODO: port from .window.js"
|
||||
},
|
||||
"url-setters-a-area.window.js": {
|
||||
"skip": "already tested in url-setters.any.js"
|
||||
}
|
||||
}
|
||||
@@ -10,13 +10,5 @@ const { WPTRunner } = require('../common/wpt');
|
||||
|
||||
const runner = new WPTRunner('url');
|
||||
|
||||
runner.setScriptModifier((obj) => {
|
||||
if (obj.filename.includes('toascii.window.js')) {
|
||||
// `a` and `area` in `toascii.window.js` is for testing `Element` that
|
||||
// created via `document.createElement`. So we need to ignore them and just
|
||||
// test `URL`.
|
||||
obj.code = obj.code.replace(/\["url", "a", "area"\]/, '[ "url" ]');
|
||||
}
|
||||
});
|
||||
runner.pretendGlobalThisAs('Window');
|
||||
runner.runJsTests();
|
||||
Reference in new issue
Block a user