mirror of
https://github.com/nodejs/node.git
synced 2025-05-01 08:42:45 +00:00

PR-URL: https://github.com/nodejs/node/pull/30993 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
21 lines
404 B
JavaScript
21 lines
404 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const stream = require('stream');
|
|
|
|
process.on('uncaughtException', common.mustCall());
|
|
|
|
const r = new stream.Readable();
|
|
r._read = function(size) {
|
|
r.push(Buffer.allocUnsafe(size));
|
|
};
|
|
|
|
const w = new stream.Writable();
|
|
w._write = function(data, encoding, cb) {
|
|
cb(null);
|
|
};
|
|
|
|
r.pipe(w);
|
|
|
|
// end() after pipe should cause unhandled exception
|
|
w.end();
|