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 9cef72d

Browse filesBrowse files
kevintab95targos
authored andcommitted
test: remove the third string literal argument from assert.strictEqual()
Third string literal argument in assert.strictEqual() needs to be removed. Otherwise, on AssertionError it would not display the values that failed the check -- this hinders debugging. The string literals are added as comments above the check. PR-URL: #21406 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 2d6b337 commit 9cef72d
Copy full SHA for 9cef72d

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

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

Copy file name to clipboardExpand all lines: test/parallel/test-string-decoder-end.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ function testBuf(encoding, buf) {
103103
// .toString() on the buffer
104104
const res3 = buf.toString(encoding);
105105

106-
assert.strictEqual(res1, res3, 'one byte at a time should match toString');
107-
assert.strictEqual(res2, res3, 'all bytes at once should match toString');
106+
// One byte at a time should match toString
107+
assert.strictEqual(res1, res3);
108+
// All bytes at once should match toString
109+
assert.strictEqual(res2, res3);
108110
}
109111

110112
function testEnd(encoding, incomplete, next, expected) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.