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.0 to 1.7.1

pkg/sinon-1.7.1.js

7

lib/sinon/util/fake_xml_http_request.js

@@ -307,2 +307,5 @@ /**

this.dispatchEvent(new sinon.Event("abort", false, false, this));
if (typeof this.onerror === "function") {
this.onerror();
}
},

@@ -388,2 +391,6 @@

this.setResponseBody(body || "");
if (typeof this.onload === "function"){
this.onload();
}
}

@@ -390,0 +397,0 @@ });

2

package.json
{
"name": "sinon",
"description": "JavaScript test spies, stubs and mocks.",
"version": "1.7.0",
"version": "1.7.1",
"homepage": "http://cjohansen.no/sinon/",

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

/**
* Sinon.JS 1.7.0, 2013/05/07
* Sinon.JS 1.7.1, 2013/05/07
*

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

@@ -628,2 +628,11 @@ /*jslint onevar: false, eqeqeq: false, browser: true*/

"fire onload event": function () {
var fireOnLoad = false;
this.onload = function(){
fireOnLoad = true;
}
this.xhr.respond(200, {}, "");
assert.isTrue(fireOnLoad);
},
"calls readystate handler with readyState DONE once": function () {

@@ -792,2 +801,3 @@ this.xhr.respond(200, {}, "");

"sets responseText to null": function () {

@@ -809,2 +819,12 @@ this.xhr.responseText = "Partial data";

"fire onerror event": function () {
var testFlag = false,
this.onerror = function(){
testFlag = true;
};
this.xhr.aborted = true;
this.xhr.abort();
assert.isTrue(testFlag);
},
"nulls request headers": function () {

@@ -811,0 +831,0 @@ this.xhr.open("GET", "/");

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