Skip to content

Commit

Permalink
test: string-decorater.lastChar
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Masashi Hirano authored and MylesBorins committed Jun 6, 2018
1 parent 1733ef9 commit 2d36150
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-string-decoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ test('utf16le', Buffer.from('3DD84DDC', 'hex'), '\ud83d\udc4d'); // thumbs up
decoder = new StringDecoder('utf8');
assert.strictEqual(decoder.write(Buffer.from('E1', 'hex')), '');

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

Expand Down

0 comments on commit 2d36150

Please sign in to comment.