supertest-session
Advanced tools
Comparing version 2.0.1 to 3.0.0
{ | ||
"name": "supertest-session", | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"description": "Cookie-based session persistence for Supertest", | ||
@@ -36,3 +36,3 @@ "main": "index.js", | ||
"object-assign": "^4.0.1", | ||
"supertest": "^1.1.0" | ||
"supertest": "^2.0.1" | ||
}, | ||
@@ -39,0 +39,0 @@ "devDependencies": { |
@@ -50,8 +50,30 @@ # Supertest sessions | ||
}); | ||
``` | ||
it('should get a restricted page', function (done) { | ||
testSession.get('/restricted') | ||
.expect(200) | ||
.end(done) | ||
You can set preconditions: | ||
```js | ||
describe('after authenticating session', function () { | ||
var authenticatedSession; | ||
beforeEach(function (done) { | ||
testSession.post('/signin') | ||
.send({ username: 'foo', password: 'password' }) | ||
.expect(200) | ||
.end(function (err) { | ||
if (err) return done(err); | ||
authenticatedSession = testSession; | ||
return done(); | ||
}); | ||
}); | ||
it('should get a restricted page', function (done) { | ||
authenticatedSession.get('/restricted') | ||
.expect(200) | ||
.end(done) | ||
}); | ||
}); | ||
``` | ||
@@ -58,0 +80,0 @@ |
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
10935
15
117
+ Addedcall-bind-apply-helpers@1.0.1(transitive)
+ Addedcall-bound@1.0.3(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedform-data@1.0.0-rc4(transitive)
+ Addedformidable@1.2.6(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.7(transitive)
+ Addedget-proto@1.0.1(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedqs@6.13.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedside-channel@1.1.0(transitive)
+ Addedside-channel-list@1.0.0(transitive)
+ Addedside-channel-map@1.0.1(transitive)
+ Addedside-channel-weakmap@1.0.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedsuperagent@2.3.0(transitive)
+ Addedsupertest@2.0.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedcomponent-emitter@1.2.1(transitive)
- Removedcookiejar@2.0.6(transitive)
- Removedextend@3.0.0(transitive)
- Removedform-data@1.0.0-rc3(transitive)
- Removedformidable@1.0.17(transitive)
- Removedisarray@0.0.1(transitive)
- Removedmime@1.3.4(transitive)
- Removedqs@2.3.3(transitive)
- Removedreadable-stream@1.0.27-1(transitive)
- Removedreduce-component@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedsuperagent@1.8.5(transitive)
- Removedsupertest@1.2.0(transitive)
Updatedsupertest@^2.0.1