Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-zlib-write-after-close.js « parallel « test - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fdad1708c81ff0c1011d124234b39c3660ea6116 (plain)
1
2
3
4
5
6
7
8
9
10
'use strict';
const common = require('../common');
const assert = require('assert');
const zlib = require('zlib');

zlib.gzip('hello', common.mustCall(function(err, out) {
  const unzip = zlib.createGunzip();
  unzip.close(common.mustCall(function() {}));
  assert.throws(() => unzip.write(out), /^Error: zlib binding closed$/);
}));