Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gently

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gently - npm Package Compare versions

Comparing version 0.9.1 to 0.9.2

20

lib/gently/gently.js

@@ -109,3 +109,19 @@ var path = require('path');

var expectation = this.expectations[0];
var validExpectations = [];
for (var i = 0, l = this.expectations.length; i < l; i++) {
var expectation = this.expectations[i];
if (expectation.count > 0) {
validExpectations.push(expectation);
}
}
this.expectations = []; // reset so that no duplicate verification attempts are made
if (!validExpectations.length) {
return;
}
var expectation = validExpectations[0];
throw new Error

@@ -137,3 +153,3 @@ ( 'Expected call to '+expectation.name+' did not happen'

// and no more expectations on that object
has_more_expectations = this.expectations.reduce(function (memo, expectation) {
var has_more_expectations = this.expectations.reduce(function (memo, expectation) {
return memo || (expectation.obj === obj && expectation.method === method);

@@ -140,0 +156,0 @@ }, false);

7

package.json
{
"name": "gently",
"version": "0.9.1",
"version": "0.9.2",
"directories": {

@@ -12,3 +12,4 @@ "lib": "./lib/gently"

"node": "*"
}
}
},
"optionalDependencies": {}
}

@@ -337,1 +337,13 @@ require('../common');

});
test(function verifyExpectNone() {
var OBJ = {toString: function() {return '[OBJ]'}};
gently.verify();
gently.expect(OBJ, 'foo', 0);
try {
gently.verify();
} catch (e) {
assert.fail('Exception should not have been thrown');
}
});
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