Permalink
Browse files

Made file creation test async as it was failing intermittently

  • Loading branch information...
1 parent 0c266ca commit b3430c22484ec6846ab453f9f6db2ecc990833a5 @bengourley bengourley committed May 23, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 test/compact.test.js
View
@@ -28,9 +28,12 @@ describe('compact.js', function() {
}).should.throw('Invalid source path \'invalid src path\'');
});
- it('should create a missing invalid destination path', function() {
+ it('should create a missing invalid destination path', function(done) {
var compact = require('../../compact').createCompact({ srcPath: srcPath, destPath: destPath + '/invalid-dest' });
- path.existsSync(destPath + '/invalid-dest').should.equal(true);
+ setTimeout(function () {
+ path.existsSync(destPath + '/invalid-dest').should.equal(true);
+ done();
+ }, 10);
});
it('should succeed with valid paths', function() {

0 comments on commit b3430c2

Please sign in to comment.