mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
68e83901f3
PR-URL: https://github.com/nodejs/node/pull/46912 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
17 lines
503 B
JavaScript
17 lines
503 B
JavaScript
'use strict';
|
|
|
|
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();
|