Skip to content

Instantly share code, notes, and snippets.

View amitzur's full-sized avatar

Amit Zur amitzur

  • Tel Aviv
View GitHub Profile
@amitzur
amitzur / README.md
Last active December 20, 2015 10:08
Multiple waitsFor in a jasmine test

Asynchronous Testing with [Jasmine]

Creating async tests with jasmine is quite intuitive.

If you've read the documentation, then you are aware of the [waitsFor][2] and [runs][2] helpers in Jasmine. I had more than one async action in my test, so it required an inspection on my side to verify that Jasmine would run the test in the same way I had expected.

If you specify a series of waitsFor or waits and runs callbacks, then Jasmine will start the countdown for each waitsFor at the appropriate time (in this gist - after the previous runs callback was completed).