this.retries(N); should support a timeout value before attempting to run the test again.
A signature like this.retries(N[, M]); where N is the # of retries & M is the # of ms to wait before trying the test again would be ideal
This would be great for my end-to-end tests
yes this will be really helpful. Waiting for this to be implemented :)
I was able to use beforeEach to delay test execution in case of retries - in the following example we need to back off proportionally to the number of failures, but it can easily be a constant
describe(....
// delay after first failure
beforeEach(function(done){
if(this.currentTest.currentRetry() > 0){
setTimeout(done, this.currentTest.currentRetry() * 500);
} else {
done();
}
})
this.retries(2)
...
// test cases here
it( ....
Most helpful comment
I was able to use
beforeEachto delay test execution in case of retries - in the following example we need to back off proportionally to the number of failures, but it can easily be a constant