Comparing version 0.7.2 to 0.7.3
@@ -35,3 +35,6 @@ var Stream = require('stream'); | ||
.on('finish',function() { | ||
outStream.end(); | ||
if (!found) | ||
outStream.emit('error',new Error('PATTERN_NOT_FOUND')); | ||
else | ||
outStream.end(); | ||
}); | ||
@@ -38,0 +41,0 @@ |
{ | ||
"name": "unzipper", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "Unzip cross-platform streaming API ", | ||
@@ -5,0 +5,0 @@ "author": "Evan Oxfeld <eoxfeld@gmail.com>", |
@@ -15,2 +15,4 @@ 'use strict'; | ||
var archive = path.join(__dirname, '../testData/compressed-standard/archive.zip'); | ||
test("pipe a single file entry out of a zip", function (t) { | ||
@@ -25,7 +27,14 @@ var writableStream = new streamBuffers.WritableStreamBuffer(); | ||
var archive = path.join(__dirname, '../testData/compressed-standard/archive.zip'); | ||
fs.createReadStream(archive) | ||
.pipe(unzip.ParseOne('file.txt')) | ||
.pipe(writableStream); | ||
}); | ||
test('errors if file is not found', function (t) { | ||
fs.createReadStream(archive) | ||
.pipe(unzip.ParseOne('not_exists')) | ||
.on('error',function(e) { | ||
t.equal(e.message,'PATTERN_NOT_FOUND'); | ||
t.end(); | ||
}); | ||
}); |
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
42984
674