Version: 2.0.0 (latest)
E2E Testing & Authentication
The last part of this tutorial explains how to write and run end-to-end tests. The purpose of these tests is not to verify that each feature of each component works, but to check that these components work properly together.
The tests are located in the src/e2e/
directory. The command to run them in development is npm run e2e
. E2E tests generally use the supertest
library which provides a high-level abstraction for testing HTTP.
Open index.ts
in src/e2e
and replace its content.
Now run the tests.
The output should look like this:
Congratulations, you have reached the end of this tutorial!