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

it-fails

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

it-fails - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "it-fails",
"version": "1.0.3",
"version": "1.0.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -9,36 +9,38 @@ const mocha = require('mocha');

Runner.prototype.grep = function() {
this.tests = {
unexpectedPasses: [],
unexpectedFails: [],
expectedFails: [],
pending: []
}
this.on('pass', (test) => {
if (test.shouldFail) {
this.failures++;
if (this.stats) {
this.stats.unexpectedPasses = this.stats.unexpectedPasses || 0;
this.stats.unexpectedPasses++;
this.stats.passes--;
}
this.tests.unexpectedPasses.push(test);
if (!this.tests) {
this.tests = {
unexpectedPasses: [],
unexpectedFails: [],
expectedFails: [],
pending: []
}
});
this.on('fail', (test, err) => {
if (test.shouldFail) {
this.failures--;
if (this.stats) {
this.stats.expectedFailures = this.stats.expectedFailures || 0;
this.stats.expectedFailures++;
this.stats.failures--;
this.on('pass', (test) => {
if (test.shouldFail) {
this.failures++;
if (this.stats) {
this.stats.unexpectedPasses = this.stats.unexpectedPasses || 0;
this.stats.unexpectedPasses++;
this.stats.passes--;
}
this.tests.unexpectedPasses.push(test);
}
this.tests.expectedFails.push(test);
} else {
this.tests.unexpectedFails.push(test);
}
});
this.on('pending', (test) => {
this.tests.pending.push(test);
});
});
this.on('fail', (test, err) => {
if (test.shouldFail) {
this.failures--;
if (this.stats) {
this.stats.expectedFailures = this.stats.expectedFailures || 0;
this.stats.expectedFailures++;
this.stats.failures--;
}
this.tests.expectedFails.push(test);
} else {
this.tests.unexpectedFails.push(test);
}
});
this.on('pending', (test) => {
this.tests.pending.push(test);
});
}
return grep.apply(this, arguments);
}
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