From 4e7ed2dfb89d1f2e7ecafd3b5a7764830de13482 Mon Sep 17 00:00:00 2001 From: Joe Henry Date: Fri, 6 Oct 2017 12:16:35 -0600 Subject: [PATCH 1/2] test: add problematic values to assert message --- test/pummel/test-stream-pipe-multi.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/pummel/test-stream-pipe-multi.js b/test/pummel/test-stream-pipe-multi.js index bb16c62348dab1..f0f55993a4423b 100644 --- a/test/pummel/test-stream-pipe-multi.js +++ b/test/pummel/test-stream-pipe-multi.js @@ -66,8 +66,11 @@ FakeStream.prototype.close = function() { // expect all streams to close properly. process.on('exit', function() { - assert.strictEqual(cnt, wclosed, 'writable streams closed'); - assert.strictEqual(cnt, rclosed, 'readable streams closed'); + wclosed = rclosed = 0; + assert.strictEqual(cnt, wclosed, `Expected ${cnt} writable streams closed ` + + `but only saw ${wclosed}`); + assert.strictEqual(cnt, rclosed, `Expected ${cnt} readable streams closed ` + + `but only saw ${rclosed}`); }); for (let i = 0; i < chunkSize; i++) { From f02206745d1555d9118de63ceba471d774dcb565 Mon Sep 17 00:00:00 2001 From: Joe Henry Date: Fri, 6 Oct 2017 18:23:38 -0600 Subject: [PATCH 2/2] test: remove assert message --- test/pummel/test-stream-pipe-multi.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/pummel/test-stream-pipe-multi.js b/test/pummel/test-stream-pipe-multi.js index f0f55993a4423b..c89d9cc6353713 100644 --- a/test/pummel/test-stream-pipe-multi.js +++ b/test/pummel/test-stream-pipe-multi.js @@ -66,11 +66,8 @@ FakeStream.prototype.close = function() { // expect all streams to close properly. process.on('exit', function() { - wclosed = rclosed = 0; - assert.strictEqual(cnt, wclosed, `Expected ${cnt} writable streams closed ` + - `but only saw ${wclosed}`); - assert.strictEqual(cnt, rclosed, `Expected ${cnt} readable streams closed ` + - `but only saw ${rclosed}`); + assert.strictEqual(cnt, wclosed); + assert.strictEqual(cnt, rclosed); }); for (let i = 0; i < chunkSize; i++) {