1'use strict'; 2const common = require('../common'); 3const stream = require('stream'); 4 5class Writable extends stream.Writable { 6 constructor() { 7 super(); 8 this.prependListener = undefined; 9 } 10 11 _write(chunk, end, cb) { 12 cb(); 13 } 14} 15 16class Readable extends stream.Readable { 17 _read() { 18 this.push(null); 19 } 20} 21 22const w = new Writable(); 23w.on('pipe', common.mustCall()); 24 25const r = new Readable(); 26r.pipe(w); 27