mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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>
12 lines
274 B
JavaScript
12 lines
274 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const { WPTRunner } = require('../common/wpt');
|
|
const runner = new WPTRunner('encoding');
|
|
|
|
runner.setInitScript(`
|
|
const { MessageChannel } = require('worker_threads');
|
|
global.MessageChannel = MessageChannel;
|
|
`);
|
|
|
|
runner.runJsTests();
|