Comparing version 4.0.1 to 4.0.2
{ | ||
"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 => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19834
292