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

unexpected-sinon

Package Overview
Dependencies
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unexpected-sinon - npm Package Compare versions

Comparing version 10.7.0 to 10.7.1

19

lib/unexpected-sinon.js

@@ -110,6 +110,4 @@ /*global location*/

// the expected calls are being recorded:
var callCount = spy.callCount;
spy.func = function () {
var onCall = spy.onCall && spy.onCall(callCount);
callCount += 1;
var onCall = spy.onCall && spy.onCall(spy.behaviors.length);
return onCall;

@@ -134,3 +132,8 @@ };

var thisValue = spy.thisValues[j];
var calledWithNew = thisValue instanceof spy;
var calledWithNew = false;
try {
// Can throw "Function has non-object prototype 'undefined' in instanceof check"
// when spying on eg. console.log
calledWithNew = thisValue instanceof spy;
} catch (e) {}
var expectedSpyCallSpec = {

@@ -367,3 +370,9 @@ proxy: spy,

if (typeof value.calledWithNew !== 'undefined') {
return expect(subject.thisValue instanceof subject.proxy, 'to satisfy', value.calledWithNew);
var calledWithNew = false;
try {
// Can throw "Function has non-object prototype 'undefined' in instanceof check"
// when spying on eg. console.log
calledWithNew = subject.thisValue instanceof subject.proxy;
} catch (e) {}
return expect(calledWithNew, 'to satisfy', value.calledWithNew);
}

@@ -370,0 +379,0 @@ }),

{
"name": "unexpected-sinon",
"version": "10.7.0",
"version": "10.7.1",
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>",

@@ -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