What problem does it solve?
This Skill provides comprehensive guidance for robust testing practices, covering unit, integration, and end-to-end testing, along with Test-Driven Development (TDD). It helps users build reliable software, reduce bugs, and maintain high code quality.
Core Features & Use Cases
- Testing Pyramid: Guidance on balancing unit, integration, and E2E tests for optimal coverage.
- Unit Testing: Best practices and examples for Jest (JavaScript) and pytest (Python), including mocking and parametrization.
- Integration Testing: Strategies for database and API integration tests using tools like Supertest.
- End-to-End Testing: Examples for Playwright and Cypress for simulating full user journeys and visual regression.
- Test-Driven Development (TDD): Explains the Red-Green-Refactor cycle for building features with tests first.
- Use Case: You're developing a new feature and want to ensure it's thoroughly tested. Use this Skill to get examples for writing unit tests with Jest, setting up API integration tests, and even creating an E2E test with Playwright for the user flow.
Quick Start
Show me an example of a pytest fixture for setting up a test database.