supertest-session
Advanced tools
Comparing version 3.3.0 to 4.0.0
{ | ||
"name": "supertest-session", | ||
"version": "3.3.0", | ||
"version": "4.0.0", | ||
"description": "Cookie-based session persistence for Supertest", | ||
@@ -9,4 +9,4 @@ "main": "index.js", | ||
"pretest": "npm run lint", | ||
"test": "jasmine-node test --forceexit", | ||
"cover": "istanbul cover jasmine-node -- --forceexit test" | ||
"test": "nyc jasmine test/*", | ||
"cover": "nyc report --reporter=text-lcov | coveralls" | ||
}, | ||
@@ -37,17 +37,18 @@ "repository": { | ||
}, | ||
"peerDependencies": { | ||
"supertest": ">= 3.1.0" | ||
}, | ||
"dependencies": { | ||
"cookiejar": "^2.0.1", | ||
"methods": "^1.1.1", | ||
"object-assign": "^4.0.1", | ||
"supertest": "^3.1.0" | ||
"object-assign": "^4.0.1" | ||
}, | ||
"devDependencies": { | ||
"connect": "^3.2.0", | ||
"cookie-session": "^1.1.0", | ||
"coveralls": "^2.11.2", | ||
"express": "^4.9.5", | ||
"istanbul": "^0.3.0", | ||
"jasmine-node": "^1.14.5", | ||
"jshint": "^2.5.10" | ||
"connect": "^3.6.6", | ||
"cookie-session": "^1.3.3", | ||
"coveralls": "^3.0.3", | ||
"express": "^4.16.4", | ||
"jasmine": "^3.3.1", | ||
"jshint": "^2.10.2", | ||
"nyc": "^13.3.0", | ||
"supertest": "^4.0.2" | ||
} | ||
} |
@@ -16,2 +16,6 @@ # Supertest sessions | ||
## Installation | ||
$ npm install --save-dev supertest supertest-session | ||
## Test | ||
@@ -126,3 +130,21 @@ | ||
By default the underlying `supertest` agent will still determine the CookieAccessInfo from the URL. | ||
If you want supertest-session to instead send cookies according to this `cookieAccess` config you | ||
can make use of the `before` hook: | ||
```js | ||
var cookieAccess = { | ||
domain: 'example.com', | ||
path: '/testpath', | ||
secure: true, | ||
script: true, | ||
}; | ||
var testSession = session(myApp, { | ||
cookieAccess: cookieAccess, | ||
before: function (req) { | ||
req.cookies = this.cookies.toValueString(); | ||
}, | ||
}); | ||
``` | ||
## License | ||
@@ -129,0 +151,0 @@ |
Sorry, the diff of this file is not supported yet
13377
2
152
8
+ Addedasap@2.0.6(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addeddezalgo@1.0.4(transitive)
+ Addedfast-safe-stringify@2.1.1(transitive)
+ Addedform-data@4.0.1(transitive)
+ Addedformidable@3.5.2(transitive)
+ Addedhexoid@2.0.0(transitive)
+ Addedmime@2.6.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedsuperagent@9.0.2(transitive)
+ Addedsupertest@7.0.0(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedcookiejar@^2.0.1
- Removedmethods@^1.1.1
- Removedsupertest@^3.1.0
- Removedcore-util-is@1.0.3(transitive)
- Removeddebug@3.2.7(transitive)
- Removedextend@3.0.2(transitive)
- Removedform-data@2.5.2(transitive)
- Removedformidable@1.2.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@1.0.0(transitive)
- Removedmime@1.6.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.25.2.1(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedsuperagent@3.8.3(transitive)
- Removedsupertest@3.4.2(transitive)
- Removedutil-deprecate@1.0.2(transitive)