Skip to content

Commit 0e3b714

Browse files
MattiasBuelensRafaelGSS
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 <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent 12605e8 commit 0e3b714

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

test/common/wpt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ class WPTRunner {
617617
'ReadableStreamBYOBReader', 'ReadableStreamBYOBRequest',
618618
'ReadableByteStreamController', 'ReadableStreamDefaultController',
619619
'ByteLengthQueuingStrategy', 'CountQueuingStrategy',
620-
'TextEncoderStream', 'TextDecoderStream',
620+
'TextEncoder', 'TextDecoder', 'TextEncoderStream', 'TextDecoderStream',
621621
'CompressionStream', 'DecompressionStream',
622622
];
623623
if (Boolean(process.versions.openssl) && !process.env.NODE_SKIP_CRYPTO) {

test/wpt/status/encoding.json

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 0 deletions
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)