Skip to content

Instantly share code, notes, and snippets.

@adamsilver
Created November 16, 2010 08:47
Show Gist options
  • Save adamsilver/701596 to your computer and use it in GitHub Desktop.
Save adamsilver/701596 to your computer and use it in GitHub Desktop.
Qunit 'raises' assertion for JsTestDriver adapter
window.raises = function(fn, msg) {
try {
fn();
ok(false, msg ? msg : '')
} catch(e) {
ok(e.name === "AssertError" ? false : true, msg ? msg : '');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment