Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jasmine-ajax

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jasmine-ajax - npm Package Compare versions

Comparing version 2.0.2 to 2.99.0

release_notes/2.0.2.md

9

lib/mock-ajax.js

@@ -212,3 +212,3 @@ /*

if (stub) {
this.response(stub);
this.respondWith(stub);
}

@@ -257,2 +257,9 @@ },

response: function(response) {
if (window.console && window.console.warn) {
window.console.warn("jasmine-ajax's response method is deprecated because it conflicts with XmlHTTPRequest 2 sytax. It will be removed in a later version. Please use respondWith");
}
this.respondWith(response);
},
respondWith: function(response) {
if (this.readyState === 4) {

@@ -259,0 +266,0 @@ throw new Error("FakeXMLHttpRequest already completed");

2

package.json

@@ -6,3 +6,3 @@ {

"main": "lib/mock-ajax.js",
"version": "2.0.2",
"version": "2.99.0",
"private": false,

@@ -9,0 +9,0 @@ "license": "MIT",

@@ -160,3 +160,3 @@ describe('FakeRequest', function() {

this.request.response({});
this.request.respondWith({});

@@ -170,3 +170,3 @@ expect(this.request.readyState).toBe(4);

this.request.send();
this.request.response({});
this.request.respondWith({});
var request = this.request;

@@ -182,7 +182,7 @@

this.request.send();
this.request.response({});
this.request.respondWith({});
var request = this.request;
expect(function() {
request.response({});
request.respondWith({});
}).toThrowError('FakeXMLHttpRequest already completed');

@@ -194,3 +194,3 @@ });

this.request.send();
this.request.response({});
this.request.respondWith({});
var request = this.request;

@@ -375,3 +375,3 @@

this.request.response({ status: 200 });
this.request.respondWith({ status: 200 });

@@ -421,3 +421,3 @@ expect(this.request).not.toHaveTriggeredEvent('loadstart');

request.response({ status: 200 });
request.respondWith({ status: 200 });

@@ -433,3 +433,3 @@ expect(request.status).toBe(200);

request.response({ status: 200, statusText: 'OK' });
request.respondWith({ status: 200, statusText: 'OK' });

@@ -472,3 +472,3 @@ expect(request.status).toBe(200);

request.response({ status: 200, responseText: 'foobar' });
request.respondWith({ status: 200, responseText: 'foobar' });

@@ -483,3 +483,3 @@ expect(request.responseText).toBe('foobar');

request.response({ status: 200 });
request.respondWith({ status: 200 });

@@ -494,3 +494,3 @@ expect(request.responseText).toBe('');

request.response({
request.respondWith({
status: 200,

@@ -510,3 +510,3 @@ responseHeaders: {

request.response({
request.respondWith({
status: 200,

@@ -526,3 +526,3 @@ responseHeaders: {

request.response({
request.respondWith({
status: 200,

@@ -547,4 +547,4 @@ responseHeaders: [

request1.response({ status: 200, responseHeaders: { 'X-Foo': 'bar' } });
request2.response({ status: 200, responseHeaders: { 'X-Baz': 'quux' } });
request1.respondWith({ status: 200, responseHeaders: { 'X-Foo': 'bar' } });
request2.respondWith({ status: 200, responseHeaders: { 'X-Baz': 'quux' } });

@@ -560,3 +560,3 @@ expect(request1.getAllResponseHeaders()).toBe('X-Foo: bar');

request.response({
request.respondWith({
status: 200,

@@ -578,3 +578,3 @@ responseHeaders: [

request.response({ status: 200, contentType: 'text/plain' });
request.respondWith({ status: 200, contentType: 'text/plain' });

@@ -590,3 +590,3 @@ expect(request.getResponseHeader('content-type')).toBe('text/plain');

request.response({ status: 200 });
request.respondWith({ status: 200 });

@@ -602,3 +602,3 @@ expect(request.getResponseHeader('content-type')).toBe('application/json');

request.response({ status: 200 });
request.respondWith({ status: 200 });

@@ -613,3 +613,3 @@ expect(request.responseXML).toBeNull();

request.response({ status: 200, contentType: 'text/xml', responseText: '<dom><stuff/></dom>' });
request.respondWith({ status: 200, contentType: 'text/xml', responseText: '<dom><stuff/></dom>' });

@@ -629,3 +629,3 @@ if (typeof window.Document !== 'undefined') {

request.response({ status: 200, contentType: 'application/xml', responseText: '<dom><stuff/></dom>' });
request.respondWith({ status: 200, contentType: 'application/xml', responseText: '<dom><stuff/></dom>' });

@@ -645,3 +645,3 @@ if (typeof window.Document !== 'undefined') {

request.response({ status: 200, contentType: 'application/text+xml', responseText: '<dom><stuff/></dom>' });
request.respondWith({ status: 200, contentType: 'application/text+xml', responseText: '<dom><stuff/></dom>' });

@@ -648,0 +648,0 @@ if (typeof window.Document !== 'undefined') {

@@ -143,3 +143,3 @@ /*global sharedAjaxResponseBehaviorForZepto_Failure: true, sharedAjaxResponseBehaviorForZepto_Success: true */

response = {status: 200, statusText: "OK", contentType: "text/html", responseText: "OK!"};
request.response(response);
request.respondWith(response);

@@ -179,3 +179,3 @@ sharedContext.responseCallback = success;

request.response(responseObject);
request.respondWith(responseObject);

@@ -223,3 +223,3 @@ sharedContext.responseCallback = success;

}};
request.response(responseObject);
request.respondWith(responseObject);
response = success.calls.mostRecent().args[2];

@@ -255,3 +255,3 @@ });

]};
request.response(responseObject);
request.respondWith(responseObject);
response = success.calls.mostRecent().args[2];

@@ -282,3 +282,3 @@ });

response = {status: 200, statusText: "OK", responseText: '{"foo": "valid JSON, dammit."}'};
request.response(response);
request.respondWith(response);

@@ -317,3 +317,3 @@ sharedContext.responseCallback = success;

response = {status: 0, statusText: "ABORT", responseText: '{"foo": "whoops!"}'};
request.response(response);
request.respondWith(response);

@@ -353,3 +353,3 @@ sharedContext.responseCallback = error;

response = {status: 500, statusText: "SERVER ERROR", contentType: "text/html", responseText: "(._){"};
request.response(response);
request.respondWith(response);

@@ -356,0 +356,0 @@ sharedContext.responseCallback = error;

@@ -167,3 +167,3 @@ getJasmineRequireObj().AjaxFakeRequest = function() {

if (stub) {
this.response(stub);
this.respondWith(stub);
}

@@ -212,2 +212,9 @@ },

response: function(response) {
if (window.console && window.console.warn) {
window.console.warn("jasmine-ajax's response method is deprecated because it conflicts with XmlHTTPRequest 2 sytax. It will be removed in a later version. Please use respondWith");
}
this.respondWith(response);
},
respondWith: function(response) {
if (this.readyState === 4) {

@@ -214,0 +221,0 @@ throw new Error("FakeXMLHttpRequest already completed");

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