Skip to content

Commit db8ad9a

Browse files
committed
fix MessageChannel is not defined in encodeInto.any.js
wpt runner import MessageChannel, fix MessageChannel is not defined in encodeInto.any.js. Fixes: nodejs#28851
1 parent 092af43 commit db8ad9a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/wpt/test-encoding.js

+7
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@
33
// Flags: --expose-internals
44

55
require('../common');
6+
const { MessageChannel } = require('worker_threads');
67
const { WPTRunner } = require('../common/wpt');
78
const runner = new WPTRunner('encoding');
89

910
// Copy global descriptors from the global object
1011
runner.copyGlobalsFromObject(global, ['TextDecoder', 'TextEncoder']);
1112

13+
runner.defineGlobal('MessageChannel', {
14+
get() {
15+
return MessageChannel;
16+
}
17+
});
18+
1219
runner.runJsTests();

0 commit comments

Comments
 (0)