unbzip2-stream
Advanced tools
Comparing version 1.0.8 to 1.0.9
12
index.js
@@ -56,10 +56,6 @@ var through = require('through'); | ||
} catch(e) { | ||
if (e instanceof bz2.Bzip2Error) { | ||
//console.error(e); | ||
stream.emit('error', e); | ||
broken = true; | ||
return false; | ||
} else { | ||
throw e; | ||
} | ||
//console.error(e); | ||
stream.emit('error', e); | ||
broken = true; | ||
return false; | ||
} | ||
@@ -66,0 +62,0 @@ } |
{ | ||
"name": "unbzip2-stream", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "streaming unbzip2 implementatio in pure javascript for node and browsers", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -36,1 +36,20 @@ var unbzip2Stream = require('../'); | ||
}); | ||
test('should emit error when stream is broken in a different way?', function(t) { | ||
t.plan(1); | ||
// this is the smallest truncated file I found that reproduced the bug, but | ||
// longer files will also work. | ||
var truncated = 'test/fixtures/truncated.bz2'; | ||
fs.createReadStream(truncated). | ||
on('error', function (err) { | ||
t.ok(false, "The file stream itself should not be failing."); | ||
}). | ||
pipe(unbzip2Stream()). | ||
on('error', function (err) { | ||
t.ok(true, err); | ||
}). | ||
on('close', function (err) { | ||
t.ok(false, "Should not reach end of stream without failing."); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
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
24208
14
590