supertest-session has two deviations from the supertest API:
the package export is a function wrapping definition of the Session class with a specific config
Sessions are created using the new keyword, but may not adjust their configuration at this time
Both 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.
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.