From 7f8528880881ce73a3e525a09c4f8efbfcd583f8 Mon Sep 17 00:00:00 2001 From: Scott Van Gilder Date: Fri, 24 Aug 2018 14:27:00 -0600 Subject: [PATCH] test: remove string literal from strictEqual() Remove 3rd argument from assert.deepStrictEqual() in test/parallel/test-stream2-writable.js to allow for debugging to work properly. PR-URL: https://github.com/nodejs/node/pull/22512 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: George Adams --- test/parallel/test-stream2-writable.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/test/parallel/test-stream2-writable.js b/test/parallel/test-stream2-writable.js index 6d4f5e9f7e4781..ec8e088221277f 100644 --- a/test/parallel/test-stream2-writable.js +++ b/test/parallel/test-stream2-writable.js @@ -55,7 +55,8 @@ for (let i = 0; i < chunks.length; i++) { }); tw.on('finish', common.mustCall(function() { - assert.deepStrictEqual(tw.buffer, chunks, 'got chunks in the right order'); + // got chunks in the right order + assert.deepStrictEqual(tw.buffer, chunks); })); chunks.forEach(function(chunk) { @@ -72,7 +73,8 @@ for (let i = 0; i < chunks.length; i++) { }); tw.on('finish', common.mustCall(function() { - assert.deepStrictEqual(tw.buffer, chunks, 'got chunks in the right order'); + // got chunks in the right order + assert.deepStrictEqual(tw.buffer, chunks); })); let i = 0; @@ -94,7 +96,8 @@ for (let i = 0; i < chunks.length; i++) { let drains = 0; tw.on('finish', common.mustCall(function() { - assert.deepStrictEqual(tw.buffer, chunks, 'got chunks in the right order'); + // got chunks in the right order + assert.deepStrictEqual(tw.buffer, chunks); assert.strictEqual(drains, 17); })); @@ -139,7 +142,8 @@ for (let i = 0; i < chunks.length; i++) { undefined ]; tw.on('finish', function() { - assert.deepStrictEqual(tw.buffer, chunks, 'got the expected chunks'); + // got the expected chunks + assert.deepStrictEqual(tw.buffer, chunks); }); chunks.forEach(function(chunk, i) { @@ -177,7 +181,8 @@ for (let i = 0; i < chunks.length; i++) { undefined ]; tw.on('finish', function() { - assert.deepStrictEqual(tw.buffer, chunks, 'got the expected chunks'); + // got the expected chunks + assert.deepStrictEqual(tw.buffer, chunks); }); chunks.forEach(function(chunk, i) { @@ -205,9 +210,10 @@ for (let i = 0; i < chunks.length; i++) { tw.on('finish', common.mustCall(function() { process.nextTick(common.mustCall(function() { - assert.deepStrictEqual(tw.buffer, chunks, - 'got chunks in the right order'); - assert.deepStrictEqual(callbacks._called, chunks, 'called all callbacks'); + // got chunks in the right order + assert.deepStrictEqual(tw.buffer, chunks); + // called all callbacks + assert.deepStrictEqual(callbacks._called, chunks); })); }));