Skip to content

Commit ae4515d

Browse files
Jason Wilsonjasnell
authored andcommitted
test: throw check in test-zlib-write-after-close
PR-URL: #11482 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
1 parent 9c4077d commit ae4515d

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)