New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@johanblumenberg/mocha

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@johanblumenberg/mocha - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

36

lib/runner.js

@@ -114,3 +114,3 @@ 'use strict';

this._invert = invert;
this.total = this.grepTotal(this.suite);
this.total = this.grepTotal(this.suite, true);
return this;

@@ -143,3 +143,3 @@ };

this._bucket = bucket;
this.total = this.grepTotal(this.suite);
this.total = this.grepTotal(this.suite, true);
return this;

@@ -158,3 +158,3 @@ };

*/
Runner.prototype.grepTotal = function(suite) {
Runner.prototype.grepTotal = function(suite, includePending) {
var self = this;

@@ -166,3 +166,5 @@ var total = 0;

if (self._match(test.fullTitle())) {
total++;
if (includePending || !test.pending) {
total++;
}
}

@@ -680,3 +682,4 @@ }

var self = this;
var total = this.grepTotal(suite);
var total = this.grepTotal(suite, true);
var totalWithoutPending = this.grepTotal(suite, false);
var afterAllHookCalled = false;

@@ -740,6 +743,11 @@

self.hook('afterAll', function() {
if (totalWithoutPending > 0) {
self.hook('afterAll', function() {
self.emit('suite end', suite);
fn(errSuite);
});
} else {
self.emit('suite end', suite);
fn(errSuite);
});
}
}

@@ -750,8 +758,12 @@ }

this.hook('beforeAll', function(err) {
if (err) {
return done();
}
if (totalWithoutPending > 0) {
this.hook('beforeAll', function(err) {
if (err) {
return done();
}
self.runTests(suite, next);
});
} else {
self.runTests(suite, next);
});
}
};

@@ -758,0 +770,0 @@

{
"name": "@johanblumenberg/mocha",
"version": "1.0.8",
"version": "1.0.9",
"description": "simple, flexible, fun test framework",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc