From fea3595c2f92beb0d31feb93da1c972cc30e6fec Mon Sep 17 00:00:00 2001 From: Kevin Thomas Date: Tue, 19 Jun 2018 20:09:03 +0530 Subject: [PATCH] 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 Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- test/parallel/test-string-decoder-end.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-string-decoder-end.js b/test/parallel/test-string-decoder-end.js index 2762ef09628..c686b19b713 100644 --- a/test/parallel/test-string-decoder-end.js +++ b/test/parallel/test-string-decoder-end.js @@ -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) {