diff --git a/test/common/wpt.js b/test/common/wpt.js index a65a0740d15..7917e17729c 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -617,7 +617,7 @@ class WPTRunner { 'ReadableStreamBYOBReader', 'ReadableStreamBYOBRequest', 'ReadableByteStreamController', 'ReadableStreamDefaultController', 'ByteLengthQueuingStrategy', 'CountQueuingStrategy', - 'TextEncoderStream', 'TextDecoderStream', + 'TextEncoder', 'TextDecoder', 'TextEncoderStream', 'TextDecoderStream', 'CompressionStream', 'DecompressionStream', ]; if (Boolean(process.versions.openssl) && !process.env.NODE_SKIP_CRYPTO) { diff --git a/test/wpt/status/encoding.json b/test/wpt/status/encoding.json index 09f8c2b545b..db481cca6a0 100644 --- a/test/wpt/status/encoding.json +++ b/test/wpt/status/encoding.json @@ -37,7 +37,7 @@ "skip": "The iso-8859-16 encoding is not supported" }, "idlharness.any.js": { - "skip": "No implementation of TextDecoderStream and TextEncoderStream" + "requires": ["small-icu"] }, "idlharness-shadowrealm.window.js": { "skip": "ShadowRealm support is not enabled" diff --git a/test/wpt/test-encoding.js b/test/wpt/test-encoding.js index af20760bd53..eb54c70867c 100644 --- a/test/wpt/test-encoding.js +++ b/test/wpt/test-encoding.js @@ -3,4 +3,6 @@ const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('encoding'); +runner.pretendGlobalThisAs('Window'); + runner.runJsTests();