Socket
Socket
Sign inDemoInstall

sinon

Package Overview
Dependencies
Maintainers
4
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sinon - npm Package Compare versions

Comparing version 14.0.2 to 15.0.0

3

lib/sinon.js

@@ -7,3 +7,2 @@ "use strict";

var fakeTimers = require("./sinon/util/fake-timers");
var format = require("./sinon/util/core/format");
var nise = require("nise");

@@ -23,4 +22,2 @@ var Sandbox = require("./sinon/sandbox");

setFormatter: format.setFormatter,
// fake timers

@@ -27,0 +24,0 @@ timers: fakeTimers.timers,

8

lib/sinon/assert.js

@@ -8,3 +8,3 @@ "use strict";

var timesInWords = require("./util/core/times-in-words");
var format = require("./util/core/format");
var inspect = require("util").inspect;
var stringSlice = require("@sinonjs/commons").prototypes.string.slice;

@@ -166,3 +166,3 @@ var globalObject = require("@sinonjs/commons").global;

msg =
`expected ${format(count)} to be a number ` +
`expected ${inspect(count)} to be a number ` +
`but was of type ${typeof count}`;

@@ -211,4 +211,4 @@ failAssertion(this, msg);

"expected value to match",
` expected = ${format(expectation)}`,
` actual = ${format(actual)}`,
` expected = ${inspect(expectation)}`,
` actual = ${inspect(actual)}`,
];

@@ -215,0 +215,0 @@

@@ -12,3 +12,3 @@ "use strict";

var deepEqual = require("@sinonjs/samsam").deepEqual;
var format = require("./util/core/format");
var inspect = require("util").inspect;
var valueToString = require("@sinonjs/commons").valueToString;

@@ -170,3 +170,3 @@

mockExpectation.fail(
`${this.method} received no arguments, expected ${format(
`${this.method} received no arguments, expected ${inspect(
expectedArguments

@@ -179,5 +179,5 @@ )}`

mockExpectation.fail(
`${this.method} received too few arguments (${format(
`${this.method} received too few arguments (${inspect(
args
)}), expected ${format(expectedArguments)}`
)}), expected ${inspect(expectedArguments)}`
);

@@ -191,5 +191,5 @@ }

mockExpectation.fail(
`${this.method} received too many arguments (${format(
`${this.method} received too many arguments (${inspect(
args
)}), expected ${format(expectedArguments)}`
)}), expected ${inspect(expectedArguments)}`
);

@@ -203,3 +203,3 @@ }

mockExpectation.fail(
`${this.method} received wrong arguments ${format(
`${this.method} received wrong arguments ${inspect(
args

@@ -212,5 +212,5 @@ )}, didn't match ${String(expectedArguments)}`

mockExpectation.fail(
`${this.method} received wrong arguments ${format(
`${this.method} received wrong arguments ${inspect(
args
)}, expected ${format(expectedArguments)}`
)}, expected ${inspect(expectedArguments)}`
);

@@ -217,0 +217,0 @@ }

@@ -7,3 +7,3 @@ "use strict";

var functionName = require("@sinonjs/commons").functionName;
var sinonFormat = require("./util/core/format");
var inspect = require("util").inspect;
var valueToString = require("@sinonjs/commons").valueToString;

@@ -212,3 +212,3 @@

formattedArgs = map(this.args, function (arg) {
return sinonFormat(arg);
return inspect(arg);
});

@@ -219,3 +219,3 @@

if (typeof this.returnValue !== "undefined") {
callStr += ` => ${sinonFormat(this.returnValue)}`;
callStr += ` => ${inspect(this.returnValue)}`;
}

@@ -222,0 +222,0 @@

@@ -9,3 +9,3 @@ "use strict";

var proxyInvoke = require("./proxy-invoke");
var sinonFormat = require("./util/core/format");
var inspect = require("util").inspect;

@@ -130,3 +130,3 @@ var push = arrayProto.push;

} else if (!isNaN(parseInt(specifier, 10))) {
return sinonFormat(args[specifier - 1]);
return inspect(args[specifier - 1]);
}

@@ -133,0 +133,0 @@

@@ -7,3 +7,3 @@ "use strict";

var timesInWords = require("./util/core/times-in-words");
var sinonFormat = require("./util/core/format");
var inspect = require("util").inspect;
var jsDiff = require("diff");

@@ -89,3 +89,3 @@

var calledArgMessage =
j < calledArgs.length ? sinonFormat(calledArg) : "";
j < calledArgs.length ? inspect(calledArg) : "";
if (match.isMatcher(expectedArg)) {

@@ -99,3 +99,3 @@ message += colorSinonMatchText(

var expectedArgMessage =
j < expectedArgs.length ? sinonFormat(expectedArg) : "";
j < expectedArgs.length ? inspect(expectedArg) : "";
var diff = jsDiff.diffJson(

@@ -132,3 +132,3 @@ calledArgMessage,

for (var i = 0, l = spyInstance.callCount; i < l; ++i) {
push(objects, sinonFormat(spyInstance.thisValues[i]));
push(objects, inspect(spyInstance.thisValues[i]));
}

@@ -142,3 +142,3 @@

map(args, function (arg) {
return sinonFormat(arg);
return inspect(arg);
}),

@@ -145,0 +145,0 @@ ", "

@@ -18,3 +18,3 @@ {

],
"version": "14.0.2",
"version": "15.0.0",
"homepage": "https://sinonjs.org/",

@@ -21,0 +21,0 @@ "author": "Christian Johansen",

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

Sorry, the diff of this file is not supported yet

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