From 63221a17b3ef2a5f5671cb7ecaeae3901c3227f1 Mon Sep 17 00:00:00 2001 From: Jason Wilson Date: Tue, 21 Feb 2017 13:59:24 -0500 Subject: [PATCH 1/3] test: add regex argument to assert throw in /test/parallel/test-zlib-write-after-close.js --- test/parallel/test-zlib-write-after-close.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-zlib-write-after-close.js b/test/parallel/test-zlib-write-after-close.js index 0c54270ec29b13..b29b8ccaca2d6d 100644 --- a/test/parallel/test-zlib-write-after-close.js +++ b/test/parallel/test-zlib-write-after-close.js @@ -6,7 +6,10 @@ const zlib = require('zlib'); zlib.gzip('hello', common.mustCall(function(err, out) { const unzip = zlib.createGunzip(); unzip.close(common.mustCall(function() {})); - assert.throws(function() { - unzip.write(out); - }); + assert.throws( + function() { + unzip.write(out); + }, + /^Error: zlib binding closed$/ + ); })); From 7f2f72d116025f0f91c223c41210e7deb6b925b9 Mon Sep 17 00:00:00 2001 From: Jason Wilson Date: Wed, 22 Feb 2017 21:53:09 -0500 Subject: [PATCH 2/3] test: cleaning up zlib-write-after-close --- test/parallel/test-zlib-write-after-close.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/parallel/test-zlib-write-after-close.js b/test/parallel/test-zlib-write-after-close.js index b29b8ccaca2d6d..d440e9ea299f31 100644 --- a/test/parallel/test-zlib-write-after-close.js +++ b/test/parallel/test-zlib-write-after-close.js @@ -6,10 +6,5 @@ const zlib = require('zlib'); zlib.gzip('hello', common.mustCall(function(err, out) { const unzip = zlib.createGunzip(); unzip.close(common.mustCall(function() {})); - assert.throws( - function() { - unzip.write(out); - }, - /^Error: zlib binding closed$/ - ); + assert.throws( () => unzip.write(out), /^Error: zlib binding closed$/ ); })); From 49e528dde159af31059e489a8db0e53a89507559 Mon Sep 17 00:00:00 2001 From: Jason Wilson Date: Thu, 23 Feb 2017 09:48:10 -0500 Subject: [PATCH 3/3] test: remove space in paren for lint removed excess spaces from line 9 --- test/parallel/test-zlib-write-after-close.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-zlib-write-after-close.js b/test/parallel/test-zlib-write-after-close.js index d440e9ea299f31..fdad1708c81ff0 100644 --- a/test/parallel/test-zlib-write-after-close.js +++ b/test/parallel/test-zlib-write-after-close.js @@ -6,5 +6,5 @@ const zlib = require('zlib'); zlib.gzip('hello', common.mustCall(function(err, out) { const unzip = zlib.createGunzip(); unzip.close(common.mustCall(function() {})); - assert.throws( () => unzip.write(out), /^Error: zlib binding closed$/ ); + assert.throws(() => unzip.write(out), /^Error: zlib binding closed$/); }));