supertest-session | Persistent sessions for supertest | Runtime Evironment library
kandi X-RAY | supertest-session Summary
kandi X-RAY | supertest-session Summary
Session wrapper around supertest.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Session constructor .
supertest-session Key Features
supertest-session Examples and Code Snippets
Community Discussions
Trending Discussions on supertest-session
QUESTION
I am testing the create item API. Now, in order to create an item, the middleware checks the tokens into the cookies and if there is a session in the db. The thing is that even if the session gets created (I can see it in the db) from the first call to the login API the create item API is not able to "read" the session. Is it like jest is making 2 different requests (one for the login and the other for the create item) or that the session doesn't persist into the same request?
middleware looks like this:
...ANSWER
Answered 2021-Jun-07 at 13:53So in order to solve the issue I did the following (pretty easy if you follow the documentation):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install supertest-session
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page