Test Patterns Write, run, and debug tests across languages. Covers unit tests, integration tests, E2E tests, mocking, coverage, and TDD workflows. When to Use - Setting up a test suite for a new project - Writing unit tests for functions or modules - Writing integration tests for APIs or database interactions - Setting up code coverage measurement - Mocking external dependencies (APIs, databases, file system) - Debugging flaky or failing tests - Implementing test-driven development (TDD) Node.js (Jest / Vitest) Setup Unit Tests Async Tests Mocking Coverage Python (pytest) Setup Unit Tests Par…