node/test/parallel/test-stream-passthrough-drain.js
Robert Nagy 37f1dd9ccd stream: drain Transform with 0 highWaterMark
Fixes: https://github.com/nodejs/node/issues/40935

PR-URL: https://github.com/nodejs/node/pull/40947
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-11-27 18:09:41 +01:00

9 lines
210 B
JavaScript

'use strict';
const common = require('../common');
const { PassThrough } = require('stream');
const pt = new PassThrough({ highWaterMark: 0 });
pt.on('drain', common.mustCall());
pt.write('hello');
pt.read();