diff --git a/test/parallel/test-zlib-write-after-close.js b/test/parallel/test-zlib-write-after-close.js index b346d2069a..0cd590a4ab 100644 --- a/test/parallel/test-zlib-write-after-close.js +++ b/test/parallel/test-zlib-write-after-close.js @@ -6,7 +6,5 @@ var zlib = require('zlib'); zlib.gzip('hello', common.mustCall(function(err, out) { var unzip = zlib.createGunzip(); unzip.close(common.mustCall(function() {})); - assert.throws(function() { - unzip.write(out); - }); + assert.throws(() => unzip.write(out), /^Error: zlib binding closed$/); }));