Fix tests

This commit is contained in:
Niklas von Hertzen 2014-09-18 22:25:37 +03:00
parent 6c08c3fa04
commit 3a3a61e316
2 changed files with 9 additions and 1 deletions

View File

@ -157,7 +157,9 @@ module.exports = function(grunt) {
var selenium = require("./tests/selenium.js"); var selenium = require("./tests/selenium.js");
var done = this.async(); var done = this.async();
var browsers = (browser) ? [grunt.config.get(this.name + "." + browser)] : _.values(grunt.config.get(this.name)); var browsers = (browser) ? [grunt.config.get(this.name + "." + browser)] : _.values(grunt.config.get(this.name));
selenium.tests(browsers, test).finally(function() { selenium.tests(browsers, test).catch(function() {
done(false);
}).finally(function() {
console.log("Done"); console.log("Done");
done(); done();
}); });

View File

@ -113,6 +113,12 @@
} else { } else {
throw new Error("Couldn't run test after 3 retries"); throw new Error("Couldn't run test after 3 retries");
} }
})
.then(function(e) {
if (e.message === "timeout error") {
throw e;
}
return e;
}); });
} }