-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use conformant API #13
Comments
rjz
added a commit
that referenced
this issue
Oct 3, 2015
This change brings the supertest-session API closer in-line with the `supertest` API it wraps. Dependents adopting the new API should create sessions using the exported factory function: var request = require('supertest-session'); request(myApp, myOpts) .get('/hello') ... The API remains back-compatible for the time being, though legacy usage should be considered deprecated and will be removed in the future.
rjz
added a commit
that referenced
this issue
Oct 3, 2015
This change brings the supertest-session API closer in-line with the `supertest` API it wraps. Dependents adopting the new API should create sessions using the exported factory function: var request = require('supertest-session'); request(myApp, myOpts) .get('/hello') ... The API remains back-compatible for the time being, though legacy usage should be considered deprecated and will be removed in the future.
rjz
added a commit
that referenced
this issue
Oct 3, 2015
This change brings the supertest-session API closer in-line with the `supertest` API it wraps. Dependents adopting the new API should create sessions using the exported factory function: var request = require('supertest-session'); request(myApp, myOpts) .get('/hello') ... The API remains back-compatible for the time being, though legacy usage should be considered deprecated and will be removed in the future.
rjz
added a commit
that referenced
this issue
Oct 3, 2015
This change brings the supertest-session API closer in-line with the `supertest` API it wraps. Dependents adopting the new API should create sessions using the exported factory function: var request = require('supertest-session'); request(myApp, myOpts) .get('/hello') ... The API remains back-compatible for the time being, though legacy usage should be considered deprecated and will be removed in the future.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
supertest-session has two deviations from the supertest API:
Session
class with a specific configSession
s are created using thenew
keyword, but may not adjust their configuration at this timeBoth decisions may be convenient in certain cases, but they limit runtime configuration (see #12) and add unnecessary complexity to the public API. An easy fix? Create
Session
instances via a supertest-esque factory function.The text was updated successfully, but these errors were encountered: