vitest-unit-testing

Installation
SKILL.md

Unit testing with Vitest

This skill provides patterns and conventions for writing comprehensive unit tests in TypeScript projects using Vitest.

When to use this skill

  • Writing unit tests for TypeScript utilities, services, or API clients
  • Testing stores (Pinia, Zustand, etc.)
  • Testing API transforms and services
  • Adding test coverage to existing code
  • Debugging failing tests

Test file structure

Location and naming

  • Place tests in __tests__/ directory next to the file being tested
  • Name test files with .test.ts suffix matching the source file name
  • Example: config.ts__tests__/config.test.ts
Installs
38
First Seen
Mar 31, 2026
vitest-unit-testing — perdolique/workflow