Skip to content

Instantly share code, notes, and snippets.

@davglass
Created May 23, 2012 16:52
Show Gist options
  • Save davglass/2776330 to your computer and use it in GitHub Desktop.
Save davglass/2776330 to your computer and use it in GitHub Desktop.
'this is a test function': function() {
var test = this;
doSomethingAsync(function() {
Assert.isTrue(false, 'This throws');
test.resume(function() {
Assert.isTrue(false, 'This is caught');
});
});
test.wait();
}
@nzakas
Copy link

nzakas commented May 23, 2012

You can't do that. :) All asserts have to be done within the context of a test, which means either outside of doSomethingAsync() or inside of test.resume(). Otherwise, the error won't be caught. It's a known issue, and I don't know of any magic that would make it not an issue.

@davglass
Copy link
Author

It's been reported several times, just adding it to the ticket so that it doesn't keep getting reported.. :)

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