🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

mocha-steps

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha-steps - npm Package Compare versions

Comparing version

to
1.0.1

21

lib/step.js
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 @@ }

2

package.json
{
"name": "mocha-steps",
"version": "1.0.0",
"version": "1.0.1",
"description": "Sequential scenarios for Mocha",

@@ -5,0 +5,0 @@ "author": "Romain Prieto",