Created
March 30, 2012 08:52
-
-
Save DimitarChristoff/2249994 to your computer and use it in GitHub Desktop.
failing buster.js setUp async delay before testing
This file contains 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
buster.testCase('dummy async test', { | |
setUp: function(done) { | |
var self = this; | |
this.yes = false; | |
setTimeout(function() { | |
self.yes = true; | |
done(); | |
}, 3000); | |
}, | |
'should pass after setup returns': function() { | |
buster.assert.isTrue(this.yes); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the above fails if the
setTimeout
is anything over 250ms.