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.7.2 to 1.7.3

pkg/sinon-1.7.3.js

5

lib/sinon.js

@@ -168,2 +168,6 @@ /*jslint eqeqeq: false, onevar: false, forin: true, nomen: false, regexp: false, plusplus: false*/

if (aString == "[object Date]") {
return a.valueOf() === b.valueOf();
}
var prop, aLength = 0, bLength = 0;

@@ -327,3 +331,2 @@

module.exports.spy = require("./sinon/spy");
// module.exports.spyCall = require("./sinon/call");
module.exports.stub = require("./sinon/stub");

@@ -330,0 +333,0 @@ module.exports.mock = require("./sinon/mock");

1

lib/sinon/spy.js

@@ -197,3 +197,2 @@ /**

/**

@@ -200,0 +199,0 @@ * @depend ../sinon.js

@@ -63,4 +63,5 @@ /**

var xhr = this;
var events = ["loadstart", "load", "abort", "loadend"];
["loadstart", "load", "abort", "loadend"].forEach(function (eventName) {
function addEventListener(eventName) {
xhr.addEventListener(eventName, function (event) {

@@ -73,4 +74,8 @@ var listener = xhr["on" + eventName];

});
});
}
for (var i = events.length - 1; i >= 0; i--) {
addEventListener(events[i]);
}
if (typeof FakeXMLHttpRequest.onCreate == "function") {

@@ -395,3 +400,3 @@ FakeXMLHttpRequest.onCreate(this);

}
}

@@ -398,0 +403,0 @@ });

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

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

/**
* Sinon.JS 1.7.2, 2013/05/08
* Sinon.JS 1.7.3, 2013/06/20
*

@@ -4,0 +4,0 @@ * @author Christian Johansen (christian@cjohansen.no)

@@ -241,2 +241,16 @@ /*jslint onevar: false, eqeqeq: false*/

"passes equal dates": function () {
var date1 = new Date(2012, 3, 5);
var date2 = new Date(2012, 3, 5);
assert(sinon.deepEqual(date1, date2));
},
"fails different dates": function () {
var date1 = new Date(2012, 3, 5);
var date2 = new Date(2013, 3, 5);
assert.isFalse(sinon.deepEqual(date1, date2));
},
"in browsers": {

@@ -243,0 +257,0 @@ requiresSupportFor: {

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