vitest

tarafından antfu

Vite tarafından desteklenen, Jest uyumlu API'ye sahip hızlı birim test çerçevesi. Test yazarken, mock'lama yaparken, kapsam yapılandırırken veya test filtreleme ve fixture'lar ile çalışırken kullanın.

npx skills add https://github.com/antfu/skills --skill vitest

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

İlgili Skills

next-cache-components
vercel
Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag
official
x402
coinbase
Discover and call paid APIs using the X402 payment protocol with automatic USDC payments on Base. Search a bazaar of paid services by keyword, list all available resources, or inspect an endpoint's price and requirements without paying Make authenticated requests to X402 endpoints with automatic USDC payment in atomic units, supporting GET, POST, PUT, DELETE, and PATCH methods Includes query parameters, custom headers, request body support, and max-amount spending limits to control payment...
official
rushstack-best-practices
microsoft
Rush monorepo'ları ile çalışmak için en iyi uygulamalar ve rehberlik sağlar. Kullanıcı Rush tabanlı bir depoda çalışırken, Rush komutları hakkında soru sorduğunda kullanın…
official
example-skill
anthropic
This skill should be used when the user asks to "demonstrate skills", "show skill format", "create a skill template", or discusses skill development patterns.…
official
playwright-dev
microsoft
Playwright'i yeni API'ler, MCP araçları, CLI komutları ve satıcı bağımlılıklarıyla genişletme kılavuzu. Monorepo yapısını, derleme/test/lint iş akışlarını ve CLAUDE.md referansı aracılığıyla kodlama kurallarını kapsar. İstemci/sunucu API'lerini uygulama, test yazma ve protokol katmanlarını değiştirme için ayrıntılı yol haritaları içerir. Playwright ekosisteminde MCP araçları, CLI komutları ve yapılandırma seçeneklerinin nasıl ekleneceğini açıklar. Üçüncü taraf npm paketlerini paketleme sürecini belgeler...
official
build-dashboard
anthropic
Etkileşimli grafikler, filtreler ve tablolar içeren bir HTML panosu oluşturun. Yönetici genel bakışı oluştururken KPI kartlarıyla kullanın, sorgu sonuçlarını bir…
official
showcase
factory-ai
Droid kontrol iş akışları için arka plan bilgisi — doğrudan çağrılmaz. Remotion destekli pencere çerçevesi, animasyonlar ve markalı… ile videolar için görsel iyileştirme.
official
finalize-agent-prompt
github
Polish and refine agent prompt files against proven best practices. Requires a prompt file as input; will request one if not provided Preserves front matter, encoding, and markdown structure while improving clarity and organization Corrects spelling, grammar, and wording issues without altering the original intent Applies patterns from successful prompts to strengthen structure and effectiveness
official