From 0d41e21b0e9b46cc179eff42c215439fb672964b Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Tue, 5 Jan 2021 19:50:40 +0100 Subject: fix: align encoding APIs to spec using WPT (#9004) --- cli/tests/unit/text_encoding_test.ts | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'cli/tests/unit/text_encoding_test.ts') diff --git a/cli/tests/unit/text_encoding_test.ts b/cli/tests/unit/text_encoding_test.ts index 189d391c5..5ae64cbce 100644 --- a/cli/tests/unit/text_encoding_test.ts +++ b/cli/tests/unit/text_encoding_test.ts @@ -69,31 +69,7 @@ unitTest(function textDecoder2(): void { assertEquals(decoder.decode(fixture), "𝓽𝓮𝔁𝓽"); }); -unitTest(function textDecoderIgnoreBOM(): void { - // deno-fmt-ignore - const fixture = new Uint8Array([ - 0xef, 0xbb, 0xbf, - 0xf0, 0x9d, 0x93, 0xbd, - 0xf0, 0x9d, 0x93, 0xae, - 0xf0, 0x9d, 0x94, 0x81, - 0xf0, 0x9d, 0x93, 0xbd - ]); - const decoder = new TextDecoder("utf-8", { ignoreBOM: true }); - assertEquals(decoder.decode(fixture), "𝓽𝓮𝔁𝓽"); -}); - -unitTest(function textDecoderNotBOM(): void { - // deno-fmt-ignore - const fixture = new Uint8Array([ - 0xef, 0xbb, 0x89, - 0xf0, 0x9d, 0x93, 0xbd, - 0xf0, 0x9d, 0x93, 0xae, - 0xf0, 0x9d, 0x94, 0x81, - 0xf0, 0x9d, 0x93, 0xbd - ]); - const decoder = new TextDecoder("utf-8", { ignoreBOM: true }); - assertEquals(decoder.decode(fixture), "ﻉ𝓽𝓮𝔁𝓽"); -}); +// ignoreBOM is tested through WPT unitTest(function textDecoderASCII(): void { const fixture = new Uint8Array([0x89, 0x95, 0x9f, 0xbf]); -- cgit v1.2.3