mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
test: string-decorater.lastChar
Added test for string-decorater.lastChar to improve coverage. PR-URL: https://github.com/nodejs/node/pull/21084 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
1 parent
1733ef9dec
commit
2d36150852
1 file changed
+2
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user