typescript-testing
Installation
SKILL.md
TypeScript Testing Rules
Test Framework
- Vitest: This project uses Vitest
- Test imports:
import { describe, it, expect, beforeEach, vi } from 'vitest' - Mock creation: Use
vi.mock()
Basic Testing Policy
Quality Requirements
- Coverage: Unit test coverage must be 70% or higher
- Independence: Each test can run independently without depending on other tests
- Reproducibility: Tests are environment-independent and always return the same results
- Readability: Test code maintains the same quality as production code
Coverage Requirements
Mandatory: Unit test coverage must be 70% or higher Metrics: Statements, Branches, Functions, Lines