◐ Shell
clean mode source ↗

test: skip url WPT subtests instead of modifying test script · nodejs/node@e04e2c9

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+

};

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();