Skip to content

Commit 6202f14

Browse files
Jason WilsonMylesBorins
Jason Wilson
authored andcommitted
test: throw check in test-zlib-write-after-close
PR-URL: #11482 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
1 parent 69327f5 commit 6202f14

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/parallel/test-zlib-write-after-close.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@ const zlib = require('zlib');
66
zlib.gzip('hello', common.mustCall(function(err, out) {
77
const unzip = zlib.createGunzip();
88
unzip.close(common.mustCall(function() {}));
9-
assert.throws(function() {
10-
unzip.write(out);
11-
});
9+
assert.throws(() => unzip.write(out), /^Error: zlib binding closed$/);
1210
}));

0 commit comments

Comments
 (0)