supertest
supertest copied to clipboard
🕷 Super-agent driven library for testing node.js HTTP servers using a fluent API. Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
Hallo, jest test run does not exit and instead prints this error ``` Jest has detected the following 64 open handles potentially keeping Jest from exiting: ● bound-anonymous-fn 23 |...
Consider this example, ```ts const agent = supertest.agent(expressApp); const response = await agent.post("/graphql").send({ key: "value" }); ``` The type of `response.body` is `any`. Ideally, we should be able to provide...
Was just using this library to write a test. Being TDD, I wrote the test first and was expecting the code to return 500. But the code was never written...
 There is no description in the readme section in https://www.npmjs.com/package/supertest, please update it so that we don't have to navigate to here to learn how to use this lib.
When using supertest to test an express app together with the example in the readme from https://github.com/davidbanham/express-async-errors, it seems supertest will not properly invoke the error handling middleware, and thus...
I have this simple example of testing an API route using supertest. I want to do an "integration test". So I want to hit the actual API, execute all the...
My backend relies on value which is added in request object as req.requestContext by api ateway. In order to test this i want to add custom property to request sent...
I have koa server with mongo connection, jest as test framework. ``` const app = new Koa() ... export default app.listen(PORT, (err) => { if (err) console.log(err) if (!IS_TEST) {...
Hello 👋 Thank you for maintaining this project. I believe I am experiencing a bug where awaiting a call to get response causes timeout. Minimal example: ```ts it("TIMEOUT when awaiting",...
Error: > Jest has detected the following 1 open handle potentially keeping Jest from exiting: > > ● TCPSERVERWRAP Env: * Node 10 * Supertest 3.3.0 * Jest 23.6 Testcode:...