Skip to content

Commit 4dba22f

Browse files
authored
test: skip url WPT subtests instead of modifying test script
Signed-off-by: Filip Skokan <panva.ip@gmail.com> PR-URL: #62635 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 4dc18ef commit 4dba22f

File tree

3 files changed

+25
-26
lines changed

3 files changed

+25
-26
lines changed

test/wpt/status/url.cjs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
'use strict';
2+
3+
module.exports = {
4+
'historical.any.js': {
5+
'fail': {
6+
'expected': [
7+
'searchParams on location object',
8+
],
9+
},
10+
},
11+
'javascript-urls.window.js': {
12+
'skip': 'requires document.body reference',
13+
},
14+
'percent-encoding.window.js': {
15+
'skip': 'requires document.body reference',
16+
},
17+
'toascii.window.js': {
18+
'skipTests': [
19+
/\(using <a(rea)?>/,
20+
],
21+
},
22+
'url-setters-a-area.window.js': {
23+
'skip': 'already tested in url-setters.any.js',
24+
},
25+
};

test/wpt/status/url.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/wpt/test-url.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,5 @@ const { WPTRunner } = require('../common/wpt');
1010

1111
const runner = new WPTRunner('url');
1212

13-
runner.setScriptModifier((obj) => {
14-
if (obj.filename.includes('toascii.window.js')) {
15-
// `a` and `area` in `toascii.window.js` is for testing `Element` that
16-
// created via `document.createElement`. So we need to ignore them and just
17-
// test `URL`.
18-
obj.code = obj.code.replace(/\["url", "a", "area"\]/, '[ "url" ]');
19-
}
20-
});
2113
runner.pretendGlobalThisAs('Window');
2214
runner.runJsTests();

0 commit comments

Comments
 (0)