sb-write-vitest

Installation
SKILL.md

Write Vitest Unit Tests

For code that already exists. If the user is writing tests before the implementation, stop and use the tdd skill instead — this skill is for backfilling.

File conventions

  • One test file per source file, beside the source: src/cart.ts → src/cart.test.ts.
  • Use *.test.*, never *.spec.*. In this project .spec. is reserved for integration/e2e tests.
  • Mirror the source extension: .ts → .test.ts, .tsx → .test.tsx.
  • One describe per exported symbol; nest describe for sub-cases when it improves readability.

Modern Vitest standards

Installs
7
First Seen
Jun 5, 2026