1'use strict'; 2 3const common = require('../common'); 4const assert = require('assert'); 5const { Gunzip } = require('zlib'); 6 7const gunzip = new Gunzip({ objectMode: true }); 8gunzip.on('error', common.mustNotCall()); 9assert.throws(() => { 10 gunzip.write({}); 11}, { 12 name: 'TypeError', 13 code: 'ERR_INVALID_ARG_TYPE' 14}); 15