Created
March 5, 2015 17:45
-
-
Save chadhietala/9c1620fe1c2a494f695d to your computer and use it in GitHub Desktop.
Async Tests In QUnit 2.0
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
| var QUnit = require('qunitjs'); | |
| QUnit.module('foo', { | |
| afterEach:function(assert) { | |
| var done = assert.async(); | |
| setTimeout(function() { | |
| done(); | |
| }, 1000); | |
| } | |
| }); | |
| QUnit.test('true', function(assert) { | |
| assert.ok(true); | |
| }); | |
| QUnit.test('false', function(assert) { | |
| var done = assert.async(); | |
| setTimeout(function() { | |
| assert.ok(!false); | |
| done(); | |
| }, 1000); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment