Testcontainers for Postgres: Make Your Tests Actually Fail
A suite of isolation tests that never fail is not a suite. Here is how I moved database tests onto Testcontainers for Postgres so breaking a rule breaks the build.
A suite of isolation tests that never fail is not a suite. Here is how I moved database tests onto Testcontainers for Postgres so breaking a rule breaks the build.
Learn a practical testing setup for Node.js and TypeScript using Jest and Supertest. This guide covers unit tests, mocks, and integration testing to help you build reliable, maintainable APIs with confidence.
Learn how to write integration tests for Node.js and Express APIs using Jest and Supertest. Test middleware, validation, error handling, and improve coverage with real-world examples.
Most Node.js developers write state-based unit tests and stop there. While those tests are important, they don’t tell the full story. Real-world applications are made of collaborating modules, and if those collaborations break, your app breaks.
In this guide, I’ll walk you through how to unit test an Express API in Node.js, using practical examples from a Task Manager project.
In this guide, you’ll learn how to set up a Node.js project with TypeScript and Jest. The article takes you through each step, from initializing the project and configuring TypeScript to integrating Jest for testing. By following this tutorial, you’ll ensure your code is type-safe, well-tested, and ready for modern development.