Skip to content

Instantly share code, notes, and snippets.

@DimitarChristoff
Created March 30, 2012 08:52
Show Gist options
  • Save DimitarChristoff/2249994 to your computer and use it in GitHub Desktop.
Save DimitarChristoff/2249994 to your computer and use it in GitHub Desktop.
failing buster.js setUp async delay before testing
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);
}
});
@DimitarChristoff
Copy link
Author

the above fails if the setTimeout is anything over 250ms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment