11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ciconst { Readable, Writable } = require('stream'); 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ciprocess.on('uncaughtException', common.mustCall((err) => { 71cb0ef41Sopenharmony_ci assert.strictEqual(err.message, 'asd'); 81cb0ef41Sopenharmony_ci})); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ciconst r = new Readable({ 111cb0ef41Sopenharmony_ci read() { 121cb0ef41Sopenharmony_ci this.push('asd'); 131cb0ef41Sopenharmony_ci } 141cb0ef41Sopenharmony_ci}); 151cb0ef41Sopenharmony_ciconst w = new Writable({ 161cb0ef41Sopenharmony_ci autoDestroy: true, 171cb0ef41Sopenharmony_ci write() {} 181cb0ef41Sopenharmony_ci}); 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_cir.pipe(w); 211cb0ef41Sopenharmony_ciw.destroy(new Error('asd')); 22