Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2d36150

Browse filesBrowse 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 <timothygu99@gmail.com> Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 1733ef9 commit 2d36150
Copy full SHA for 2d36150

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-string-decoder.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-string-decoder.js
+2-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.