What problem does it solve?
This Skill solves the problem of flaky or failing unit tests in TypeScript/NestJS by providing a structured, high-quality approach to setting up Jest, writing deterministic tests, diagnosing failures, and improving reliability and performance.
Core Features & Use Cases
- Jest unit testing workflows: Setup, writing, reviewing, running, debugging, and optimizing tests using dedicated workflow files.
- Deterministic NestJS testing conventions: Enforces Arrange-Act-Assert (AAA), consistent naming, and deep mocking via DeepMocked/createMock.
- Reliability guardrails: Detects and fixes open handles, prevents async hangs, and reduces noisy outputs by redirecting test logs to temp files.
- Target-specific guidance: Includes patterns for services/usecases, controllers, guards, interceptors, pipes/filters, plus mocking strategies and repository/Redis/Kafka test approaches as references.
Quick Start
Use the typescript-unit-testing Skill whenever you are working on a Jest-based unit test for a NestJS/TypeScript component, such as when creating a new .spec.ts file or debugging failing tests.