mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
2d6b337df9
commit
9cef72dd21
1 file changed
+4
-2
@@ -103,8 +103,10 @@ function testBuf(encoding, buf) {
|
||||
// .toString() on the buffer
|
||||
const res3 = buf.toString(encoding);
|
||||
|
||||
assert.strictEqual(res1, res3, 'one byte at a time should match toString');
|
||||
assert.strictEqual(res2, res3, 'all bytes at once should match toString');
|
||||
// One byte at a time should match toString
|
||||
assert.strictEqual(res1, res3);
|
||||
// All bytes at once should match toString
|
||||
assert.strictEqual(res2, res3);
|
||||
}
|
||||
|
||||
function testEnd(encoding, incomplete, next, expected) {
|
||||
|
||||
Reference in new issue
Block a user