From d0bdf82658cb67af10cd606437fb8aa8b87e936e Mon Sep 17 00:00:00 2001 From: AbhimanyuVashisht Date: Thu, 24 May 2018 06:12:22 +0530 Subject: [PATCH] test: remove third argument(string literal) from strictEqual() In test/parallel/test-stream-pip-await-drain-push-while-write.js, There are two calls in it to assert.strictEqual(). Both calls are provided with three arguments. The third argument in each case is a string literal. Unfortunately, that will suppress the presentation of the values of the first two arguments in the case of an AssertionError This is fixed by removing the third argument from the call. The third argument in the call is basically a string literal. Refs: https://www.nodetodo.org/getting-started --- .../test-stream-pipe-await-drain-push-while-write.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-stream-pipe-await-drain-push-while-write.js b/test/parallel/test-stream-pipe-await-drain-push-while-write.js index 263e6b6801f68b..d14ad46cb066ec 100644 --- a/test/parallel/test-stream-pipe-await-drain-push-while-write.js +++ b/test/parallel/test-stream-pipe-await-drain-push-while-write.js @@ -7,8 +7,7 @@ const writable = new stream.Writable({ write: common.mustCall(function(chunk, encoding, cb) { assert.strictEqual( readable._readableState.awaitDrain, - 0, - 'State variable awaitDrain is not correct.' + 0 ); if (chunk.length === 32 * 1024) { // first chunk @@ -16,8 +15,7 @@ const writable = new stream.Writable({ // We should check if awaitDrain counter is increased in the next // tick, because awaitDrain is incremented after this method finished process.nextTick(() => { - assert.strictEqual(readable._readableState.awaitDrain, 1, - 'Counter is not increased for awaitDrain'); + assert.strictEqual(readable._readableState.awaitDrain, 1); }); }