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

portals

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

portals - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

6

bower.json
{
"name": "portals",
"version": "0.1.0",
"version": "0.1.1",
"authors": [

@@ -27,4 +27,6 @@ "Nick Glenn <nick@helpfulhuman.com>"

"test",
"tests"
"tests",
"gulpfile.js",
"LICENSE"
]
}
{
"name": "portals",
"version": "0.1.0",
"version": "0.1.1",
"description": "An XHR/Ajax library with sugar for single page applications.",

@@ -5,0 +5,0 @@ "main": "portals.js",

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

status: this.status,
headers: this.responseHeaders,
headers: this.responseHeaders || {},
body: this.responseText

@@ -184,0 +184,0 @@ };

@@ -32,3 +32,3 @@ describe('Portal#send()', function () {

// set up the fake response
this.requests[0].respond(200, {}, data);
this.requests[0].respond(200, { Accept: 'application/json' }, data);

@@ -39,2 +39,4 @@ // proceed with promise resolution

expect(res.body).to.equal(data);
expect(res.headers).to.be.an('object');
expect(res.headers.Accept).to.equal('application/json');
done();

@@ -47,3 +49,3 @@ });

*/
it('sends a simple GET request with success', function (done) {
it('sends a simple GET request with failure', function (done) {
var opts = { method: 'GET', url: '/' };

@@ -54,3 +56,3 @@ var data = JSON.stringify({ foo: 'bar' });

// set up the fake response
this.requests[0].respond(402, {}, data);
this.requests[0].respond(402, { Accept: 'application/json' }, data);

@@ -61,2 +63,4 @@ // proceed with promise resolution

expect(err.body).to.equal(data);
expect(err.headers).to.be.an('object');
expect(err.headers.Accept).to.equal('application/json');
done();

@@ -63,0 +67,0 @@ });

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