summaryrefslogtreecommitdiff
path: root/test/parallel/test-zlib-write-after-close.js
blob: b346d2069a5e96b49b1bb4912e6f0d17fbe7484c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
'use strict';
const common = require('../common');
var assert = require('assert');
var zlib = require('zlib');

zlib.gzip('hello', common.mustCall(function(err, out) {
  var unzip = zlib.createGunzip();
  unzip.close(common.mustCall(function() {}));
  assert.throws(function() {
    unzip.write(out);
  });
}));