python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Express/Typescript + Jest + Supertest + TypeORM - Random Timeout Exception & Memory Leak
I am attempting to write unit tests for an express API. Each test suite creates a new instance of an express server before the tests.
When each test suite is run independently there seems to be no iss...
suvantorw
Votes: 0
Answers: 1
What is the best way to test secure routes on APIs that requires authentication while using Cognito OAuth with MFA?
I am using AWS Cognito with MFA and I can't use an actual user with a session to test the routes in with supertest testcases.
What is the best practice for testing authenticated routes without getting...
Mahmoud Hanora
Votes: 0
Answers: 2
Testing Express, MongoDB & TypeScript with supertest and Jest fails when I use app
I want to test my Express, MongoDB, TypeScript REST-Api, but I am having difficulty with a line of code where supertest takes app as parameter. The test fails and I get the 404 status code instead of ...

Charleskimani
Votes: 0
Answers: 1
encode object into cookie string for testing
I'm using cookies to pass the session about the logged in user, and on the server I can set and get them fine:
res.cookie("foo", { bar: "baz" })
// later on
console.log(req.cookie...

Shining Love Star
Votes: 0
Answers: 1