1var common = require('../common'); 2var assert = common.assert; 3var fake = common.fake.create(); 4var DelayedStream = common.DelayedStream; 5var Stream = require('stream').Stream; 6 7(function testHandleSourceErrors() { 8 var source = new Stream(); 9 var delayedStream = DelayedStream.create(source, {pauseStream: false}); 10 11 // We deal with this by attaching a no-op listener to 'error' on the source 12 // when creating a new DelayedStream. This way error events on the source 13 // won't throw. 14 source.emit('error', new Error('something went wrong')); 15})(); 16 17