mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
605d7c4d6a
PR-URL: https://github.com/nodejs/node/pull/29086 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
17 lines
291 B
JavaScript
17 lines
291 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const { Writable } = require('stream');
|
|
|
|
// Don't emit 'drain' if ended
|
|
|
|
const w = new Writable({
|
|
write(data, enc, cb) {
|
|
process.nextTick(cb);
|
|
},
|
|
highWaterMark: 1
|
|
});
|
|
|
|
w.on('drain', common.mustNotCall());
|
|
w.write('asd');
|
|
w.end();
|