Testing a Koa application with supertest using async/await
Marcusoft
JUNE 12, 2018
Create a new directory, I called mine koasupertestasync. Enter the directory and set up a package.json file using npm init -y. To do this we will have to await the call to mongo using monk, then do the request using supertest and finally use supertests own asseration features to ensure that we get back what we expected.
Let's personalize your content