typescript-testing
Installation
SKILL.md
TypeScript Testing Patterns
Inspect the owning package and existing implementation first. Reuse established project types, helpers, errors, lifecycle behavior, and test utilities. The patterns below are options, not an implementation checklist. Introduce one only when the current task requires it.
Project-specific rules
- Test changed behavior and one contract per active boundary.
- Do not repeat the same scenarios through routes, services, repositories, and full-stack suites.
- Reuse existing database test Layers and fixtures.
- Create a reusable harness only after a second current consumer demonstrates the same setup.
- Before testing a wrapper extensively, question whether the wrapper should exist.
Comprehensive testing patterns using Vitest for unit testing, MSW for API mocking, and snapshot testing for complex object validation.