mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
errorOrDestroy emits 'error' synchronously due to compat reasons. However, it should be possible to use correct async behaviour for new code. PR-URL: https://github.com/nodejs/node/pull/29744 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
13 lines
268 B
JavaScript
13 lines
268 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const { Gunzip } = require('zlib');
|
|
|
|
const gunzip = new Gunzip({ objectMode: true });
|
|
gunzip.write({}, common.expectsError({
|
|
name: 'TypeError'
|
|
}));
|
|
gunzip.on('error', common.expectsError({
|
|
name: 'TypeError'
|
|
}));
|