Skip to content

Commit 24f9d3f

Browse files
MattiasBuelensUlisesGascon
authored andcommitted
test: enable idlharness tests for encoding
TextDecoderStream and TextEncoderStream are now exposed as globals, so we can run the entire Encoding idlharness test suite. PR-URL: #50778 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 904e645 commit 24f9d3f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

test/common/wpt.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ class WPTRunner {
610610
'ReadableStreamBYOBReader', 'ReadableStreamBYOBRequest',
611611
'ReadableByteStreamController', 'ReadableStreamDefaultController',
612612
'ByteLengthQueuingStrategy', 'CountQueuingStrategy',
613-
'TextEncoderStream', 'TextDecoderStream',
613+
'TextEncoder', 'TextDecoder', 'TextEncoderStream', 'TextDecoderStream',
614614
'CompressionStream', 'DecompressionStream',
615615
];
616616
if (Boolean(process.versions.openssl) && !process.env.NODE_SKIP_CRYPTO) {

test/wpt/status/encoding.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"skip": "The iso-8859-16 encoding is not supported"
3838
},
3939
"idlharness.any.js": {
40-
"skip": "No implementation of TextDecoderStream and TextEncoderStream"
40+
"requires": ["small-icu"]
4141
},
4242
"idlharness-shadowrealm.window.js": {
4343
"skip": "ShadowRealm support is not enabled"

test/wpt/test-encoding.js

+2
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
const { WPTRunner } = require('../common/wpt');
44
const runner = new WPTRunner('encoding');
55

6+
runner.pretendGlobalThisAs('Window');
7+
68
runner.runJsTests();

0 commit comments

Comments
 (0)