skills/vitest/SKILL.md
Next-generation testing framework powered by Vite — test API, matchers, mocking, snapshots, coverage, browser mode, type testing, CLI, and advanced patterns. MANDATORY TRIGGERS: vitest, Vitest, vitest.config, vi.mock, vi.fn, vi.spyOn, expect matchers, test coverage vitest, vitest browser mode. Also trigger when user wants to write unit tests with Vite, configure test coverage, mock modules in ESM, run browser-based component tests, benchmark code, test TypeScript types, or migrate from Jest. When in doubt about whether to use this skill for JavaScript/TypeScript testing tasks, use it.
npx skillsauth add abhisheksharma-17/skills-graph vitestInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Next generation testing framework powered by Vite.
Source: vitest.dev | Package: vitest v4.x | License: MIT
| Reference | File | Read When |
|-----------|------|-----------|
| Overview & Setup | references/00-overview.md | Getting started, installation, configuration, why Vitest |
| Writing Tests | references/01-writing-tests.md | test, describe, it, hooks, lifecycle, context, fixtures |
| Assertions & Matchers | references/02-assertions.md | expect, toBe, toEqual, asymmetric matchers, custom matchers |
| Mocking | references/03-mocking.md | vi.fn, vi.spyOn, vi.mock, module mocking, partial mocking |
| Timers & Dates | references/04-timers-dates.md | Fake timers, vi.useFakeTimers, vi.setSystemTime, date mocking |
| Snapshots | references/05-snapshots.md | toMatchSnapshot, inline, file snapshots, serializers |
| Coverage | references/06-coverage.md | v8, istanbul, thresholds, reporters, per-file config |
| Browser Mode | references/07-browser-mode.md | Component testing, Playwright provider, DOM assertions |
| CLI & Reporters | references/08-cli-reporters.md | vitest run, watch, bench, reporters, sharding, filtering |
| Type Testing | references/09-type-testing.md | expectTypeOf, assertType, typecheck config |
| Environments | references/10-environments.md | jsdom, happy-dom, edge-runtime, custom environments |
| Advanced Patterns | references/11-advanced-patterns.md | Projects, parallelism, in-source testing, debugging, migration |
# Install
npm install -D vitest
# Run tests
npx vitest
# Run once (CI)
npx vitest run
# With coverage
npx vitest run --coverage
development
High-throughput LLM inference and serving engine with PagedAttention, continuous batching, and OpenAI-compatible API. MANDATORY TRIGGERS: vLLM, vllm, LLM serving, LLM inference engine, PagedAttention. Also trigger when the user wants to serve LLMs in production, deploy models with tensor parallelism, use speculative decoding, quantize models for inference, build OpenAI-compatible API servers, or optimize LLM throughput and latency. When in doubt about whether to use this skill for LLM serving tasks, use it.
tools
Type-safe Python agent framework for building production-grade GenAI applications with Pydantic validation, structured outputs, and dependency injection. MANDATORY TRIGGERS: pydantic-ai, pydantic_ai, PydanticAI, pydantic ai agent. Also trigger when the user wants to build type-safe AI agents in Python, create structured LLM outputs with Pydantic models, implement dependency injection for agents, use tools/capabilities with LLMs, or build multi-agent systems with Python type safety. When in doubt about whether to use this skill for Python AI agent tasks, use it.
development
Durable execution platform for building fault-tolerant workflows, long-running processes, and resilient distributed applications. MANDATORY TRIGGERS: temporal, temporal.io, temporalio, durable execution, workflow orchestration engine. Also trigger when the user wants to build fault-tolerant workflows, implement saga patterns, create long-running distributed processes, orchestrate microservices with retries and timeouts, or build durable AI agent pipelines. When in doubt about whether to use this skill for workflow orchestration or durable execution tasks, use it.
tools
AI framework for building RAG pipelines, agents, workflows, and data-augmented LLM applications with 300+ integrations. MANDATORY TRIGGERS: llamaindex, llama-index, llama_index, LlamaIndex, VectorStoreIndex, SimpleDirectoryReader, LlamaHub, LlamaParse. Also trigger when the user wants to build RAG applications with LlamaIndex, create document indexing pipelines, build agentic workflows with tool calling, implement structured data extraction from documents, or connect LLMs to custom data sources. When in doubt about whether to use this skill for RAG, document indexing, or LLM data augmentation tasks, use it.