Commits

urso committed da00ee3

added 'failOnException'

Comments (0)

Files changed (1)

     }
 }
 
+function failOnException(fn) {
+    return function(c) {
+        try {
+            fn.apply(this, arguments);
+        } catch (e) {
+            if(e === 'AssertFailed' || e === 'InvalidCase') {
+                throw e;
+            }
+            c.assert(false);
+        }
+    }
+}
+