You’ve been there: Node.js tests pass both locally and in CI. You deploy with confidence. Then staging reveals the truth—bugs that only appear with real Postgres 16 collations, actual Redis connection limits, or Kafka partition behavior your in-memory mocks never captured.
The solution are 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.
In this talk, we’ll show you how to use Testcontainers with AWS CDK and AWS Lambda Node.js APIs to ship code faster, with stronger tests and a more reliable CI/CD pipeline.
This talk has been presented at Node Congress 2026, check out the latest edition of this JavaScript Conference.























