Skip to content

Commit 2d36150

Browse files
Masashi HiranoMylesBorins
authored andcommitted
test: string-decorater.lastChar
Added test for string-decorater.lastChar to improve coverage. PR-URL: #21084 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Lance Ball <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 1733ef9 commit 2d36150

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/parallel/test-string-decoder.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ test('utf16le', Buffer.from('3DD84DDC', 'hex'), '\ud83d\udc4d'); // thumbs up
9090
decoder = new StringDecoder('utf8');
9191
assert.strictEqual(decoder.write(Buffer.from('E1', 'hex')), '');
9292

93-
// A quick test for lastNeed & lastTotal which are undocumented.
93+
// A quick test for lastChar, lastNeed & lastTotal which are undocumented.
94+
assert(decoder.lastChar.equals(new Uint8Array([0xe1, 0, 0, 0])));
9495
assert.strictEqual(decoder.lastNeed, 2);
9596
assert.strictEqual(decoder.lastTotal, 3);
9697

0 commit comments

Comments
 (0)