Huge News!Announcing our $40M Series B led by Abstract Ventures.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.6.0 to 10.6.1

22

lib/unexpected-sinon.js

@@ -141,2 +141,9 @@ /*global location*/

function getCallTimeLineFromSpies(spies) {
// Get a flattened array of all calls to all the specified spies:
return Array.prototype.concat.apply([], spies.map(getCalls)).sort(function (a, b) {
return a.callId - b.callId;
});
}
return {

@@ -562,2 +569,3 @@ name: 'unexpected-sinon',

expect.addAssertion('<spy|array|sinonSandbox> to have no calls [exhaustively] satisfying <object>', function (expect, subject, value) {
var spies = extractSpies(subject);
var keys = Object.keys(value);

@@ -575,4 +583,4 @@ if (

// Get a flattened array of all calls to all the specified spies:
var calls = Array.prototype.concat.apply([], extractSpies(subject).map(getCalls));
var calls = getCallTimeLineFromSpies(spies);
var promises = calls.map(function (call) {

@@ -621,2 +629,3 @@ return expect.promise(function () {

expect.addAssertion('<spy|array|sinonSandbox> to have a call [exhaustively] satisfying <object>', function (expect, subject, value) {
var spies = extractSpies(subject);
var keys = Object.keys(value);

@@ -634,4 +643,4 @@ if (

// Get a flattened array of all calls to all the specified spies:
var calls = Array.prototype.concat.apply([], extractSpies(subject).map(getCalls));
var calls = getCallTimeLineFromSpies(spies);
var promises = calls.map(function (call) {

@@ -678,2 +687,3 @@ return expect.promise(function () {

expect.addAssertion('<spy|array|sinonSandbox> to have all calls [exhaustively] satisfying <object>', function (expect, subject, value) {
var spies = extractSpies(subject);
var keys = Object.keys(value);

@@ -691,5 +701,3 @@ if (

// Get a flattened array of all calls to all the specified spies:
var calls = Array.prototype.concat.apply([], extractSpies(subject).map(getCalls));
return expect(calls, 'to have items [exhaustively] satisfying', value);
return expect(getCallTimeLineFromSpies(spies), 'to have items [exhaustively] satisfying', value);
});

@@ -696,0 +704,0 @@

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

@@ -37,4 +37,4 @@ "keywords": [

"coveralls": "2.11.3",
"eslint": "2.7.0",
"eslint-config-onelint": "1.0.2",
"eslint": "2.13.1",
"eslint-config-onelint": "1.2.0",
"istanbul": "0.3.17",

@@ -41,0 +41,0 @@ "mocha": "2.4.5",

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