Socket
Socket
Sign inDemoInstall

sinon

Package Overview
Dependencies
Maintainers
2
Versions
208
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 1.4.1 to 1.4.2

release.sh

3

Changelog.txt

@@ -0,1 +1,4 @@

== 1.4.2 / 2012-07-11
* sinon.match for arrays (Maximilian Antoni)
== 1.4.1 / 2012-07-11

@@ -2,0 +5,0 @@ * Strengthen a Node.JS inference to avoid quirky behavior with Mocha

2

lib/sinon/match.js

@@ -59,3 +59,3 @@ /* @depend ../sinon.js */

}
} else if (exp !== act) {
} else if (!sinon.deepEqual(exp, act)) {
return false;

@@ -62,0 +62,0 @@ }

{
"name": "sinon",
"description": "JavaScript test spies, stubs and mocks.",
"version": "1.4.1",
"version": "1.4.2",
"homepage": "http://cjohansen.no/sinon/",

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

@@ -125,2 +125,20 @@ /*jslint onevar: false, eqeqeq: false*/

"returns true if array is equal": function () {
var match = sinon.match({ arr: ["a", "b"] });
assert(match.test({ arr: ["a", "b"] }));
},
"returns false if array is not equal": function () {
var match = sinon.match({ arr: ["b", "a"] });
assert.isFalse(match.test({ arr: ["a", "b"] }));
},
"returns true if number objects are equal": function () {
var match = sinon.match({ one : new Number(1) });
assert(match.test({ one : new Number(1) }));
},
"returns true if test matches": function () {

@@ -127,0 +145,0 @@ var match = sinon.match({ prop: sinon.match.typeOf("boolean") });

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