Created
January 25, 2017 08:48
-
-
Save martsie/7a7893dd93700932a818e80fcdd6f0ba to your computer and use it in GitHub Desktop.
QUnit test in CoffeeScript with multiple async assertions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QUnit.module 'Waiter class' | |
test 'Waiter waits for 1 second twice', (assert) -> | |
done1 = do assert.async | |
done2 = do assert.async | |
assert.expect 2 | |
waiter = new Waiter() | |
waiter.waitAndReturn -> | |
ok true, 'Timer completed' | |
do done1 | |
waiter.waitAndReturn -> | |
ok true, 'Timer completed' | |
do done2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment