What problem does it solve?
This Skill provides comprehensive guidance and tools for setting up, writing, reviewing, running, debugging, and optimizing end-to-end (E2E) and integration tests for TypeScript/NestJS projects. It focuses on using real infrastructure via Docker and adhering to the Given-When-Then (GWT) pattern.
Core Features & Use Cases
- Setup: Configure E2E testing infrastructure, including Docker Compose for services like Kafka, PostgreSQL, MongoDB, and Redis. Create Jest configurations and test helpers.
- Writing Tests: Develop E2E tests using the GWT pattern, testing API endpoints, workflows, and event-driven scenarios with real dependencies.
- Debugging: Systematically fix failing or flaky tests, troubleshoot connection issues, and diagnose race conditions.
- Optimization: Improve test performance, reduce execution time, and optimize Docker startup.
- Use Case: A developer needs to set up E2E tests for a new NestJS microservice that interacts with PostgreSQL and Kafka. They can use this Skill to configure
docker-compose.e2e.yml, create jest-e2e.config.ts, write GWT-style tests for API endpoints, and debug any failures.
Quick Start
Use the typescript-e2e-testing skill to write an E2E test for the user creation API endpoint.