test: throw check in test-zlib-write-after-close
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
cba1020531
commit
817b28b4e4
@ -6,7 +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);
|
||||
});
|
||||
assert.throws(() => unzip.write(out), /^Error: zlib binding closed$/);
|
||||
}));
|
||||
|
Loading…
x
Reference in New Issue
Block a user