Skip to content

Commit

Permalink
fix(test): does not remove dir on first ensure test
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jul 8, 2017
1 parent 0eaaf6e commit f3245cc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ describe('fs', function() {
return fs.ensureWriteStream(target).then(function(stream) {
stream.path.should.eql(target);
stream.on('finish', function() {
return fs.rmdir(pathFn.dirname(target));
return fs.unlink(target);
});
});
});
Expand All @@ -1150,9 +1150,7 @@ describe('fs', function() {
fs.ensureWriteStream(target, function(err, stream) {
should.not.exist(err);
stream.path.should.eql(target);
stream.on('open', function() {
return fs.rmdir(pathFn.dirname(target), callback);
});
callback();
});
});

Expand All @@ -1161,7 +1159,7 @@ describe('fs', function() {
var stream = fs.ensureWriteStreamSync(target);

stream.path.should.eql(target);
stream.on('open', function() {
stream.on('finish', function() {
return fs.rmdir(pathFn.dirname(target));
});
});
Expand Down

0 comments on commit f3245cc

Please sign in to comment.