QuickNote API [V]

So far, we used Postman to inspect the behavior of our API server. In particular, when we refactored the API or added a new feature, we tried a few endpoints to ensure the changes did not break the API. Unfortunately, this approach to testing is not comprehensive enough. Ideally, you have a complete suite of tests covering all API specifications. You will need to rerun your tests to verify that you haven't broken anything as you refactor.

It is possible to write and run tests in Postman. (See Writing tests on Postman Learning Center,) However, I prefer to include the tests within the actual project (codebase) itself. To that aim, we will use Jest, "a delightful JavaScript Testing Framework with a focus on simplicity," in this chapter.