mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
test: add zlib close-after-error regression test
Add a regression test based on the report in https://github.com/nodejs/node/issues/6034. PR-URL: https://github.com/nodejs/node/pull/6270 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
bad006f2e1
commit
4bfed26d1a
1 file changed
+14
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
// https://github.com/nodejs/node/issues/6034
|
||||
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const zlib = require('zlib');
|
||||
|
||||
const decompress = zlib.createGunzip(15);
|
||||
|
||||
decompress.on('error', common.mustCall((err) => {
|
||||
assert.doesNotThrow(() => decompress.close());
|
||||
}));
|
||||
|
||||
decompress.write('something invalid');
|
||||
Reference in new issue
Block a user