Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retry failing Jasmine test?

I have a few functional tests in Jasmine that will periodically fail due to something in the DOM not having finished composing. I would like to be able to have these tests retry a couple of times rather than failing the test suite.

I'm looking for something similar to the way that Mocha behaves with https://mochajs.org/#retry-tests or, even better, the ability to specify a wait and then retry.

like image 781
bigtunacan Avatar asked Oct 29 '22 15:10

bigtunacan


1 Answers

Per Jasmine's owner:

this is functionality we'd like to keep out of jasmine itself.

source: https://github.com/jasmine/jasmine/issues/960

protractor-flake has been recommended to solve this, assuming you are using Protractor.

like image 159
Westy92 Avatar answered Nov 15 '22 06:11

Westy92