Running outside of the main Node.js context prevents us from upgrading the WPT harness because new versions more aggressively check the identity of globals like error constructors. Instead of exposing globals used by the tests on vm sandboxes, use worker threads to run everything. PR-URL: https://github.com/nodejs/node/pull/34796 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
18 lines
475 B
JavaScript
18 lines
475 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const { WPTRunner } = require('../common/wpt');
|
|
|
|
const runner = new WPTRunner('url');
|
|
|
|
// Needed to access to DOMException.
|
|
runner.setFlags(['--expose-internals']);
|
|
|
|
// DOMException is needed by urlsearchparams-constructor.any.js
|
|
runner.setInitScript(`
|
|
const { internalBinding } = require('internal/test/binding');
|
|
const { DOMException } = internalBinding('messaging');
|
|
global.DOMException = DOMException;
|
|
`);
|
|
|
|
runner.runJsTests();
|