Integration test
also: integration tests, integration testing
An automated check that several parts of your app work correctly together, such as your code and your database.
A test that exercises two or more components together, such as an API route plus a real test database, to catch problems in how they connect: wrong queries, mismatched data formats, or misconfigured services.
Each bulb works on its own. Now you screw one into the lamp, plug it in and flip the switch. You're testing the connection, not just the bulb.
Many real bugs live in the seams: code that talks to the database, a payment provider or another service. Integration tests check those seams, which unit tests skip on purpose.
Unit tests pass, but the integration test for POST /bookings fails. The route sends startTime as text, and the database expects a date and time.
Add an integration test that creates a habit through the API and confirms it's actually saved in the test database. Don't mock the database for this one.
Confusing it with an end-to-end test. An integration test checks a few parts together, usually without clicking through the real screens.