mirror of
https://github.com/nodejs/node.git
synced 2025-04-28 21:46:48 +00:00

This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: https://github.com/nodejs/node/pull/24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
22 lines
456 B
JavaScript
22 lines
456 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const zlib = require('zlib');
|
|
const { Writable } = require('stream');
|
|
|
|
// Verify that the zlib transform does not error in case
|
|
// it is destroyed with data still in flight
|
|
|
|
const ts = zlib.createGzip();
|
|
|
|
const ws = new Writable({
|
|
write: common.mustCall((chunk, enc, cb) => {
|
|
setImmediate(cb);
|
|
ts.destroy();
|
|
})
|
|
});
|
|
|
|
const buf = Buffer.allocUnsafe(1024 * 1024 * 20);
|
|
ts.end(buf);
|
|
ts.pipe(ws);
|