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

supertest

Package Overview
Dependencies
Maintainers
6
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

supertest - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

2

package.json
{
"name": "supertest",
"version": "4.0.1",
"version": "4.0.2",
"description": "SuperAgent driven library for testing HTTP servers",

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

@@ -84,17 +84,2 @@ # SuperTest

If you need to test with HTTPS against localhost, you can use superagent's `.trustLocalhost()`, which let's you bypass any errors related to broken/insecure HTTPS on localhost.
```js
describe('GET /user', function() {
it('responds with json via HTTPS on localhost', function(done) {
request(app)
.get('/user')
.trustLocalhost()
.set('Accept', 'application/json')
.expect('Content-Type', /json/)
.expect(200, done);
});
});
```
One thing to note with the above statement is that superagent now sends any HTTP

@@ -115,2 +100,3 @@ error (anything other than a 2XX response code) to the callback as the first argument if

.set('Accept', 'application/json')
.expect('Content-Type', /json/)
.expect(200)

@@ -133,2 +119,3 @@ .end(function(err, res) {

.set('Accept', 'application/json')
.expect('Content-Type', /json/)
.expect(200)

@@ -135,0 +122,0 @@ .then(response => {

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