vitest-testing
Installation
SKILL.md
Vitest Testing
Use the tdd skill when the task is a logic change or bug fix that should start with a failing test. This skill covers Vitest-specific test shape and review rules.
Setup
- Check
vitest.config.*before assuming globals are enabled. - If globals are enabled, use
describe,it,expect,vi,beforeEach, andassertdirectly without importing them. - If globals are not enabled, import only the Vitest APIs used by the file.
- Avoid
await import()and other dynamic imports in tests unless the behaviour under test is dynamic loading. - Use
vi.stubEnv()instead of mutatingprocess.envdirectly.