Skip to content

Instantly share code, notes, and snippets.

@p4ul
Forked from adamsilver/gist:701596
Created February 24, 2012 00:15
Show Gist options
  • Save p4ul/1896018 to your computer and use it in GitHub Desktop.
Save p4ul/1896018 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