
You’ve been there: Your Unit tests pass both locally and in CI. You deploy with confidence. You thought.. Then staging in the real cloud reveals the truth—bugs that only show up with actual RDS parameter settings, real SQS and SNS throughput limits, or Lambda and API Gateway behaviour your local mocks never captured.
The solution is Testcontainers.
Testcontainers is a testing library that provides easy and lightweight APIs for bootstrapping integration tests with real services wrapped in Docker containers. Using Testcontainers, you can write tests talking to the same type of services you use in production without mocks or in-memory services. Spin them up, run migrations, execute your Node.js service against them, assert results, auto-cleanup.
