vitest

onmax/nuxt-skills · updated Apr 8, 2026

$npx skills add https://github.com/onmax/nuxt-skills --skill vitest
0 commentsdiscussion
summary

Vite-native unit and integration testing framework with Jest-compatible API and parallel execution.

  • Supports testing Vue, React, and Svelte components with configurable environments (Node, jsdom, or browser mode)
  • Provides Jest-compatible API including describe/it blocks, hooks, fixtures, and globals configuration
  • Includes comprehensive mocking capabilities: vi.fn for function mocks, vi.mock for module mocking, and timer/date utilities
  • Offers code coverage thresholds, snapshot test
skill.md

Vitest

Vite-native testing framework with Jest-compatible API.

When to Use

  • Writing unit/integration tests for Vite projects
  • Testing Vue/React/Svelte components
  • Mocking modules, timers, or dates
  • Running concurrent/parallel tests
  • Type testing with TypeScript

Quick Start

npm i -D vitest
// vitest.config.ts
import { defineConfig } from 'vitest/config'

export default defineConfig({
  test: {
    globals: true,
    environment: 'node',  // or 'jsdom' for DOM tests
  },
})
// example.test.ts
import { describe, expect, it, vi } from 'vitest'

describe('math', () => {
  it('adds numbers', () => {
    expect(1 + 1).toBe(2)
  })
})

Reference Files

Task File
Configuration, CLI, projects config.md
test/describe, hooks, fixtures test-api.md
vi.fn, vi.mock, timers, spies mocking.md
expect, snapshots, coverage, filtering utilities.md
Environments, type testing, browser mode advanced.md

Loading Files

Consider loading these reference files based on your task:

DO NOT load all files at once. Load only what's relevant to your current task.

Cross-Skill References

  • Vue component testing → Use vue skill for component patterns
  • Library testing → Use ts-library skill for library patterns
  • Vite configuration → Use vite skill for shared config

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.550 reviews
  • Hiroshi Jackson· Dec 28, 2024

    vitest has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Olivia Harris· Dec 16, 2024

    Solid pick for teams standardizing on skills: vitest is focused, and the summary matches what you get after install.

  • Ren Ndlovu· Dec 8, 2024

    Registry listing for vitest matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Ganesh Mohane· Dec 4, 2024

    vitest fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Rahul Santra· Nov 23, 2024

    vitest is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Sakura Khanna· Nov 19, 2024

    Useful defaults in vitest — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Zara Anderson· Nov 7, 2024

    I recommend vitest for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Alexander Gill· Oct 26, 2024

    Useful defaults in vitest — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Pratham Ware· Oct 14, 2024

    Keeps context tight: vitest is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Sakura Agarwal· Oct 10, 2024

    I recommend vitest for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

showing 1-10 of 50

1 / 5