Comparing version 0.1.2 to 0.1.3
@@ -61,4 +61,6 @@ // Copyright 2014. A Medium Corporation | ||
this.mapper(chunk, function (err, data) { | ||
if (err) return callback(err) | ||
this.push(data) | ||
callback(err) | ||
callback(null) | ||
}.bind(this)) | ||
@@ -65,0 +67,0 @@ } |
{ | ||
"name": "sculpt", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Generate Node 0.10-friendly transform streams to manipulate other streams.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -103,2 +103,19 @@ // Copyright 2014. A Medium Corporation | ||
}) | ||
it('Should not throw on pushing data when async streams have an error', function (done) { | ||
var stream = map(function (data, callback) { | ||
callback(new Error('This stream never works')) | ||
}).async().multi() | ||
stream.on('error', function (err) { | ||
assert.ok(err) | ||
done() | ||
}) | ||
stream.on('end', function () { | ||
done(new Error('This stream should error before it ends')) | ||
}) | ||
stream.end('I see a Mansard roof through the trees') | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101410
38
905
3