mocha-steps
Advanced tools
Comparing version 1.0.0 to 1.0.1
global.step = function(msg, fn) { | ||
function markRemainingTestsAndSubSuitesAsPending(currentTest) { | ||
var tests = currentTest.parent.tests; | ||
var suites = currentTest.parent.suites; | ||
for (var index = tests.indexOf(currentTest) + 1; index < tests.length; index++) { | ||
var test = tests[index]; | ||
test.pending = true; | ||
} | ||
for (var index = 0; index < suites.length; index++) { | ||
var suite = suites[index]; | ||
suite.pending = true; | ||
} | ||
} | ||
// | ||
@@ -15,3 +30,3 @@ // sync tests | ||
return promise.catch(function(err) { | ||
context.test.parent._bail = true; | ||
markRemainingTestsAndSubSuitesAsPending(context.test); | ||
throw err; | ||
@@ -23,3 +38,3 @@ }); | ||
} catch (ex) { | ||
context.test.parent._bail = true; | ||
markRemainingTestsAndSubSuitesAsPending(context.test); | ||
throw ex; | ||
@@ -39,3 +54,3 @@ } | ||
function onError() { | ||
context.test.parent._bail = true; | ||
markRemainingTestsAndSubSuitesAsPending(context.test); | ||
process.removeListener('uncaughtException', onError); | ||
@@ -42,0 +57,0 @@ } |
{ | ||
"name": "mocha-steps", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Sequential scenarios for Mocha", | ||
@@ -5,0 +5,0 @@ "author": "Romain Prieto", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2315
2
69
1
0