Skip to content

Commit 43fbb04

Browse files
committed
test: fix linting errors
1 parent 7143420 commit 43fbb04

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/parallel/test-whatwg-encoding-custom-textdecoder-windows1252-decoding.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,14 @@ const assert = require('assert');
4242
[0x9C, 0x0153], // LATIN SMALL LIGATURE OE
4343
[0x9D, 0x009D], // UNDEFINED
4444
[0x9E, 0x017E], // LATIN SMALL LETTER Z WITH CARON
45-
[0x9F, 0x0178] // LATIN CAPITAL LETTER Y WITH DIAERESIS
45+
[0x9F, 0x0178], // LATIN CAPITAL LETTER Y WITH DIAERESIS
4646
];
4747

4848
for (let i = 0; i < win1252_0x7F_0x9F.length; i++) {
4949
const byte = win1252_0x7F_0x9F[i][0];
5050
const expectedUnicodeCode = win1252_0x7F_0x9F[i][1];
5151
const arr = new Uint8Array([byte]);
52-
let decoded;
53-
assert.doesNotThrow(() => {
54-
decoded = new TextDecoder("windows-1252").decode(arr);
55-
}, `Decoding byte ${byte} should not throw`);
52+
const decoded = new TextDecoder('windows-1252').decode(arr);
5653
assert.strictEqual(decoded.length, 1, `Decoded string for ${byte} should have length 1`);
5754
const actualUnicodeCode = decoded.codePointAt(0);
5855
assert.strictEqual(actualUnicodeCode, expectedUnicodeCode, `Decoded code point for ${byte} should be U+${expectedUnicodeCode.toString(16).toUpperCase()}`);

0 commit comments

Comments
 (0)