LaunchKit · 2026

Setup & Installation

npx skills add https://github.com/LambdaTest/agent-skills --skill vitest-skill
or paste the link and ask your coding assistant to install it
https://github.com/LambdaTest/agent-skills/tree/main/vitest-skill
View on GitHub

What This Skill Does

Generates Vitest unit tests for JavaScript and TypeScript projects. Covers mocking with vi, snapshot testing, React component tests, and in-source testing patterns. Works with the Jest-compatible API, so migration from Jest is straightforward.

Vitest has a different mocking API and config format than Jest, and this skill gets the syntax right without you having to check the docs each time.

When to use it

  • Writing unit tests for a Vite-based TypeScript project
  • Migrating existing Jest mocks to vi.mock and vi.fn syntax
  • Setting up in-source tests alongside production code
  • Adding snapshot tests for serialized data or component output
  • Testing React components with Testing Library and Vitest