diff options
author | 2023-09-21 00:51:48 -0700 | |
---|---|---|
committer | 2023-09-21 00:51:48 -0700 | |
commit | 01d2cb5d98c6e90507d1dfba962276cf2edf9ad7 (patch) | |
tree | 2dad514b023f3e9b5d40fab11025482c5f17b013 | |
parent | 2664dfad9bb0b2d83bf64ebda5b7e512b89f5e91 (diff) | |
download | bun-01d2cb5d98c6e90507d1dfba962276cf2edf9ad7.tar.gz bun-01d2cb5d98c6e90507d1dfba962276cf2edf9ad7.tar.zst bun-01d2cb5d98c6e90507d1dfba962276cf2edf9ad7.zip |
Prettier
-rw-r--r-- | test/js/web/encoding/text-decoder.test.js | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/test/js/web/encoding/text-decoder.test.js b/test/js/web/encoding/text-decoder.test.js index de71fb351..3685a5f6d 100644 --- a/test/js/web/encoding/text-decoder.test.js +++ b/test/js/web/encoding/text-decoder.test.js @@ -266,25 +266,24 @@ describe("TextDecoder", () => { }); describe("TextDecoder ignoreBOM", () => { - it.each([ { - encoding: 'utf-8', - bytes: [0xEF, 0xBB, 0xBF, 0x61, 0x62, 0x63] + encoding: "utf-8", + bytes: [0xef, 0xbb, 0xbf, 0x61, 0x62, 0x63], }, { - encoding: 'utf-16le', - bytes: [0xFF, 0xFE, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00] - } - ])('should ignoreBOM for: %o', ({encoding, bytes}) => { - const BOM = '\uFEFF'; + encoding: "utf-16le", + bytes: [0xff, 0xfe, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00], + }, + ])("should ignoreBOM for: %o", ({ encoding, bytes }) => { + const BOM = "\uFEFF"; const array = new Uint8Array(bytes); - const decoder_ignore_bom = new TextDecoder(encoding, {ignoreBOM: true}); + const decoder_ignore_bom = new TextDecoder(encoding, { ignoreBOM: true }); expect(decoder_ignore_bom.decode(array)).toStrictEqual(`${BOM}abc`); - const decoder_not_ignore_bom = new TextDecoder(encoding, {ignoreBOM: false}); - expect(decoder_not_ignore_bom.decode(array)).toStrictEqual('abc'); + const decoder_not_ignore_bom = new TextDecoder(encoding, { ignoreBOM: false }); + expect(decoder_not_ignore_bom.decode(array)).toStrictEqual("abc"); }); }); |