The next level of testing abstraction is integration tests. Unlike unit tests, which rely on only mocks to derive their behavior, integration tests usually introduce some level of real application integration with other services, connections, and dependencies. These tests can be highly important as they can be much more behaviorally realistic in their definition than unit tests. They are excellent for testing full behaviors of your application while still being very focused on individual parts. Testing functionalities such as our Express REST APIs and checking their expected results make for great integration tests.
Creating integration tests for Express REST APIs
Getting ready
Let's explore how to add some API integration...