Browse Source

Fix random test fail

Gaël Métais 10 years ago
parent
commit
55dc387d3c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      test/api/screenshotHandlerTest.js

+ 2 - 0
test/api/screenshotHandlerTest.js

@@ -93,6 +93,7 @@ describe('screenshotHandler', function() {
         var tmpFolderPath = screenshot;
         var tmpFolderPath = screenshot;
 
 
         screenshot.deleteTmpFile()
         screenshot.deleteTmpFile()
+            .delay(1000)
             .then(function() {
             .then(function() {
                 fs.existsSync(screenshot.getTmpFolder().path).should.equal(false);
                 fs.existsSync(screenshot.getTmpFolder().path).should.equal(false);
                 done();
                 done();
@@ -114,6 +115,7 @@ describe('screenshotHandler', function() {
         fs.existsSync(tmpImagePath).should.equal(true);
         fs.existsSync(tmpImagePath).should.equal(true);
 
 
         screenshot.deleteTmpFile()
         screenshot.deleteTmpFile()
+            .delay(1000)
             .then(function() {
             .then(function() {
                 fs.existsSync(tmpImagePath).should.equal(false);
                 fs.existsSync(tmpImagePath).should.equal(false);
                 fs.existsSync(tmpFolderPath).should.equal(false);
                 fs.existsSync(tmpFolderPath).should.equal(false);