Comparing version 1.0.1 to 1.0.2
@@ -58,5 +58,6 @@ var opNames = [ | ||
ist.throws = function throws(f, expected) { | ||
let threw = true | ||
try { | ||
f() | ||
throw new ist.Failure("Did not throw", "throws") | ||
threw = false | ||
} catch(e) { | ||
@@ -69,2 +70,3 @@ var matches = !expected ? true | ||
} | ||
if (!threw) throw new ist.Failure("Did not throw", "throws") | ||
} |
{ | ||
"name": "ist", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Mini assertion library", | ||
@@ -5,0 +5,0 @@ "main": "ist.js", |
4861
66
4