Skip to content

Commit

Permalink
test: add zlib close-after-error regression test
Browse files Browse the repository at this point in the history
Add a regression test based on the report in
nodejs#6034.
  • Loading branch information
addaleax committed Apr 19, 2016
1 parent c7fef3d commit 96f04d6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/parallel/test-zlib-close-after-error.js
Original file line number Diff line number Diff line change
@@ -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');

0 comments on commit 96f04d6

Please sign in to comment.