test-vitest

Installation
SKILL.md

Use this skill when working with Vitest unit tests. The semantics below are Vitest 2 and later — mock resetting and restoration behave differently on 1.x.

Requires

  • test-unit-guidelines

Vitest Rules

Test Structure

Use describe to name the unit and it to name the behaviour. Import the globals explicitly rather than relying on globals: true, so a test file's dependencies are visible.

import { describe, it, expect } from "vitest";
import { applyDiscount } from "./pricing";
Installs
1
Repository
nearform/skills
GitHub Stars
3
First Seen
Oct 10, 2026