agentleFS
sanity-iosanity-io/next-sanity/.agents/skills/vitest/SKILL.md

vitest

Skill956 starsChanged 3 months agoMITView on GitHub

Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.

Files
SKILL.md

Vitest is a next-generation testing framework powered by Vite. It provides a Jest-compatible API with native ESM, TypeScript, and JSX support out of the box. Vitest shares the same config, transformers, resolvers, and plugins with your Vite app.

Key Features:

  • Vite-native: Uses Vite's transformation pipeline for fast HMR-like test updates
  • Jest-compatible: Drop-in replacement for most Jest test suites
  • Smart watch mode: Only reruns affected tests based on module graph
  • Native ESM, TypeScript, JSX support without configuration
  • Multi-threaded workers for parallel test execution
  • Built-in coverage via V8 or Istanbul
  • Snapshot testing, mocking, and spy utilities

The skill is based on Vitest 3.x, generated at 2026-01-28.

Core

TopicDescriptionReference
ConfigurationVitest and Vite config integration, defineConfig usagecore-config
CLICommand line interface, commands and optionscore-cli
Test APItest/it function, modifiers like skip, only, concurrentcore-test-api
Describe APIdescribe/suite for grouping tests and nested suitescore-describe
Expect APIAssertions with toBe, toEqual, matchers and asymmetric matcherscore-expect
HooksbeforeEach, afterEach, beforeAll, afterAll, aroundEachcore-hooks

Features

TopicDescriptionReference
MockingMock functions, modules, timers, dates with vi utilitiesfeatures-mocking
SnapshotsSnapshot testing with toMatchSnapshot and inline snapshotsfeatures-snapshots
CoverageCode coverage with V8 or Istanbul providersfeatures-coverage
Test ContextTest fixtures, context.expect, test.extend for custom fixturesfeatures-context
ConcurrencyConcurrent tests, parallel execution, shardingfeatures-concurrency
FilteringFilter tests by name, file patterns, tagsfeatures-filtering

Advanced

TopicDescriptionReference
Vi Utilitiesvi helper: mock, spyOn, fake timers, hoisted, waitForadvanced-vi
EnvironmentsTest environments: node, jsdom, happy-dom, customadvanced-environments
Type TestingType-level testing with expectTypeOf and assertTypeadvanced-type-testing
ProjectsMulti-project workspaces, different configs per projectadvanced-projects

Download now (ZIP)

  • Other versions42 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 32

    1. supabase/supabase★ 114k88% same
    2. joe-bell/cva★ 6.9k85% same
    3. antfu/skills★ 6k84% same
    4. TheEdoRan/next-safe-action★ 3.1k100% same
    5. compozy/compozy★ 2.8k85% same
    6. midudev/tailwind-animations★ 1.5k100% same
    7. onmax/nuxt-skills★ 72485% same
    8. letstri/permix★ 64185% same
    9. pedronauck/skills★ 64185% same
    10. victorgarciaesgi/regle★ 508100% same

    22 more not listed

    Wrote their own version · 10

    1. prowler-cloud/prowler★ 15ksame name
    2. tazo90/next-openapi-gen★ 193same name
    3. PaulRBerg/agent-skills★ 104same name
    4. PyModel/react-frontend-skills★ 23same name
    5. G1Joshi/Agent-Skills★ 15same name
    6. PaulRBerg/dot-agents★ 6same name
    7. sentimony/skills★ 6same name
    8. thongdn-it/react-agent-skills★ 5same name
    9. rexxars/skills★ 1same name
    10. SkotAlexsander/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use nitro, nodejs-best-practices and 10 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • SentrySkill

      nitro

      Build and deploy universal JavaScript servers with Nitro v3. Use when working with nitro.config.ts, defineNitroConfig, defineHandler, defineConfig, server.ts entry, filesystem routing, route rules, useStorage, defineCachedHandler, useDatabase, definePlugin, runtime hooks, Vercel/Cloudflare deployment, or migrating from Nitro v2/nitropack.

      Also in 4 projects that use this

    • xenitV1Skill

      nodejs-best-practices

      Node.js development principles and decision-making. Framework selection, async patterns, security, and architecture. Teaches thinking, not copying.

      Also in 4 projects that use this

    • midudevSkill

      tailwind-css-patterns

      Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, typography, colors, and modern CSS best practices. Use when styling React/Vue/Svelte components, building responsive layouts, implementing design systems, or optimizing CSS workflow.

      Also in 3 projects that use this

    • VercelSkill

      next-cache-components

      Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag

      Also in 3 projects that use this

    • xfstudioSkill

      nodejs-backend-patterns

      Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.

      Also in 3 projects that use this

    • leonaaardobSkill

      zod

      Complete Zod validation library documentation. Use when working with Zod schema validation, TypeScript type inference, form validation, API validation, error handling, or data parsing. Covers schema definition, refinements, transforms, error customization, and ecosystem integrations.

      Also in 3 projects that use this

  • In this repository14 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.