mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
f7b5eacaa6
PR-URL: https://github.com/nodejs/node/pull/29886 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
17 lines
409 B
JavaScript
17 lines
409 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const { MessageChannel } = require('worker_threads');
|
|
const { WPTRunner } = require('../common/wpt');
|
|
const runner = new WPTRunner('encoding');
|
|
|
|
// Copy global descriptors from the global object
|
|
runner.copyGlobalsFromObject(global, ['TextDecoder', 'TextEncoder']);
|
|
|
|
runner.defineGlobal('MessageChannel', {
|
|
get() {
|
|
return MessageChannel;
|
|
}
|
|
});
|
|
|
|
runner.runJsTests();
|