Skip to content

Commit 9cef72d

Browse 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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 2d6b337 commit 9cef72d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

+4-2
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)