• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common');
3const stream = require('stream');
4
5process.on('uncaughtException', common.mustCall());
6
7const r = new stream.Readable();
8r._read = function(size) {
9  r.push(Buffer.allocUnsafe(size));
10};
11
12const w = new stream.Writable();
13w._write = function(data, encoding, cb) {
14  cb(null);
15};
16
17r.pipe(w);
18
19// end() after pipe should cause unhandled exception
20w.end();
21