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 5.x (beta), generated at 2026-06-22.

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
Test TagsLabel tests with tags to filter runs and apply shared optionsfeatures-test-tags
ReportersBuilt-in reporters, default selection, CI/output configfeatures-reporters
BenchmarkingWrite benchmarks with the bench fixture (Tinybench)features-benchmarking

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

pagerduty-api
anthropic
PagerDuty'yi sorgulayın ve yönetin — kimin nöbetçi olduğunu öğrenin, olayları listeleyin ve yönetin, yükseltme politikalarını ve programlarını okuyun, kimin neden çağrıldığını izleyin,…
official
figma-create-new-file
openai
Yeni bir boş Figma dosyası oluşturur. Kullanıcı yeni bir Figma tasarımı veya FigJam dosyası oluşturmak istediğinde ya da use_figma çağrısı yapmadan önce yeni bir dosyaya ihtiyaç duyduğunuzda kullanın.
official
git-commit
cloudflare
Git commit oluştururken commit mesajlarının proje standartlarına uygun olmasını sağlamak için kullanılır. Kısalık ve… odaklı harika commit mesajları için 7 kuralı uygular.
official
exploring-apm-traces
posthog
PostHog APM (OpenTelemetry span) verilerini MCP aracılığıyla kullanarak dağıtık uygulama performansını inceler. Kullanıcı servis izleri, yavaş… hakkında soru sorduğunda kullanın.
official
earnings-deep-dive
openai
Use when analyzing public-company earnings after results, guidance, transcript, or call commentary. Do not use for pre-print previews.
official
prisma-database-setup-postgresql
prisma
PostgreSQL Kurulumu. Bu Prisma özelliğini kullanırken başvuru.
official
sdk-install
launchdarkly
Doğru LaunchDarkly SDK’yı onboarding sırasında kurar ve başlatır; iç içe geçmiş becerileri sırayla çalıştırarak: detect, plan, apply. Üst onboarding Adım 6 ilk sıradadır…
official
take
tldraw
tldraw/tldraw deposunda bir GitHub sorunu bul, ata, uygula, doğrula ve bir çekme isteği aç. Kullanıcı take'i çağırdığında, bir sorunu almayı istediğinde,…
official