Vitest Testing Guide
Writing fast, maintainable unit tests:
- Colocate test files alongside source code (
*.test.ts). - Use
vi.mock()with type-safe factories. - Reset mocks between tests with
vi.restoreAllMocks().
Write blazingly fast unit and integration tests with Vitest, ESM support, mock timers, and coverage reporting.
Andromity loads skills from folders you trust. Install with andromity skill install vitest-unit-testing — autonomy and approval limits stay configurable per session.
# Install the "Vitest Fast Unit Testing" skill You are installing an AgenticMarket skill into this workspace. Follow these steps exactly. ## 1. Detect your environment and choose the destination file - Andromity: `.andromity/skills/vitest-unit-testing/SKILL.md` (or user scope `~/.andromity/skills/vitest-unit-testing/SKILL.md`) - Antigravity / Gemini CLI: `.agent/skills/vitest-unit-testing/SKILL.md` - Cursor: `.cursor/rules/vitest-unit-testing.mdc` - Claude Code: append to `CLAUDE.md` (or `.claude/skills/vitest-unit-testing.md`) - Windsurf: append to `.windsurfrules` - Cline / Roo Code: `.clinerules/vitest-unit-testing.md` - GitHub Copilot: append to `.github/copilot-instructions.md` - ChatGPT / web only: paste the content into Custom Instructions - Any other agent: save to `.agent/skills/vitest-unit-testing/SKILL.md` ## 2. Create the destination file - Preserve every existing file and configuration entry. - Create parent folders as needed. - Never overwrite unrelated content. ## 3. Write exactly this content ```markdown --- name: vitest-unit-testing description: "Write blazingly fast unit and integration tests with Vitest, ESM support, mock timers, and coverage reporting." author: community license: mit version: 1.0.0 --- # Vitest Testing Guide Writing fast, maintainable unit tests: - Colocate test files alongside source code (`*.test.ts`). - Use `vi.mock()` with type-safe factories. - Reset mocks between tests with `vi.restoreAllMocks()`. ``` ## 4. Verify - Confirm the file exists and is readable. - Report the destination path and confirm the "Vitest Fast Unit Testing" skill is installed and active. Skill metadata: - Slug: vitest-unit-testing - Category: testing - License: mit - Source: AgenticMarket
Writing fast, maintainable unit tests:
*.test.ts).vi.mock() with type-safe factories.vi.restoreAllMocks().Write blazingly fast unit and integration tests with Vitest, ESM support, mock timers, and coverage reporting.
Vitest Fast Unit Testing works seamlessly with Cursor (.cursor/rules), Claude Code (CLAUDE.md & .claude/skills), Windsurf (.windsurfrules), Google Antigravity (.agent/skills), Andromity (.andromity/skills), and Cline.
Click '1-Click Prompt Install' in the right sidebar or copy the prompt into your agent chat (Cursor Composer, Claude Code, or Andromity). The agent automatically configures the skill instruction file into your workspace.
Yes, Vitest Fast Unit Testing is 100% free and open-source under the mit license on AgenticMarket with no per-call fees or paywalls.
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
End-to-end browser automation, Page Object Model (POM), trace recording, and cross-browser visual regression testing.
/em:stress-test — Business assumption stress testing. Use before betting on a plan whose core assumptions are unvalidated — e.g. stress-testing 'enterprise buyers will tolerate a 6-month pilot' or a hockey-stick revenue model.