• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common');
3const assert = require('assert');
4const { Readable, Writable } = require('stream');
5
6process.on('uncaughtException', common.mustCall((err) => {
7  assert.strictEqual(err.message, 'asd');
8}));
9
10const r = new Readable({
11  read() {
12    this.push('asd');
13  }
14});
15const w = new Writable({
16  autoDestroy: true,
17  write() {}
18});
19
20r.pipe(w);
21w.destroy(new Error('asd'));
22