Comparing version
@@ -51,2 +51,8 @@ /* | ||
;[readable, writable, dummyWritable].forEach(function(stream) { | ||
stream.on('error', function(err) { | ||
that.emit('error', err) | ||
}) | ||
}) | ||
this.on('finish', function() { | ||
@@ -53,0 +59,0 @@ writable.end() |
{ | ||
"name": "reduplexer", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Another Stream2 duplexer", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
17
test.js
@@ -76,1 +76,18 @@ | ||
}) | ||
test('pass through error events', function(t) { | ||
// two because it must listen for both readable and | ||
// writable | ||
t.plan(2) | ||
var writable = new stream.PassThrough() | ||
, instance | ||
instance = duplexer(writable, writable) | ||
instance.on('error', function(err) { | ||
t.ok(err, 'an error is emitted') | ||
}) | ||
writable.emit('error', new Error('fake!')) | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
267092
9.39%124
15.89%