Comparing version 1.1.32 to 1.1.33
@@ -27,3 +27,3 @@ (function () { | ||
function pipe(allStreams, options, callback) { | ||
var error, finish, end, | ||
var error, finish, end, open, | ||
readError, writeError, | ||
@@ -85,2 +85,3 @@ | ||
} else { | ||
open = true; | ||
write.on('error', onWriteError); | ||
@@ -108,2 +109,4 @@ | ||
onEnd(); | ||
} else if (open && readError && error.code === 'EISDIR') { | ||
onEnd(); | ||
} else if (bothFinish || justEnd || justFinish) { | ||
@@ -110,0 +113,0 @@ onEnd(); |
{ | ||
"name": "pipe-io", | ||
"version": "1.1.32", | ||
"version": "1.1.33", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -5,0 +5,0 @@ "description": "Pipe streams and handle events", |
@@ -20,2 +20,14 @@ (function() { | ||
test('getBody', function(t) { | ||
var read = fs.createReadStream(__filename); | ||
pipe.getBody(read, function(error, data) { | ||
var file = fs.readFileSync(__filename, 'utf8'); | ||
t.equal(data, file, 'getbody <-> readFile'); | ||
t.end(); | ||
}); | ||
}); | ||
test('file1 | file2: no error', function(t) { | ||
@@ -60,2 +72,13 @@ var tmp = os.tmpdir(), | ||
test('file1 | file2: error EISDIR', function(t) { | ||
var tmp = os.tmpdir(), | ||
name = path.basename(__filename), | ||
nameTmp = path.join(tmp, name + random); | ||
tryPipe('/', nameTmp, function(error) { | ||
t.equal(error.code, 'EISDIR'); | ||
t.end(); | ||
}); | ||
}); | ||
test('file1 | gzip | file2: no errors', function(t) { | ||
@@ -62,0 +85,0 @@ var tmp = os.tmpdir(), |
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
16369
276