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.1.0-beta.1, generated at 2026-10-23.

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

expo-upgrade
expo
Framework (OSS). Expo SDK sürümlerini yükseltme ve bağımlılık sorunlarını giderme kılavuzu
apidevelopmenttesting
ui-sdk
vercel
React, Vue, Svelte, Solid veya web bileşenlerinde ui-sdk ile arayüzler oluşturur. Bileşenlerini seçme ve bir araya getirme; stepper, splitter, transfer list veya emoji picker gibi, pakette bulunmayan bir bileşeni ya da davranışı @ui-sdk/core kullanarak oluşturma; arayüzü createAgent, agent tools ve WebMCP aracılığıyla ajanların kullanabilmesini sağlama; klavye, odak, ARIA, sunucu tarafında işleme ve sağdan sola yazım desteğini test etme konularını kapsar. Mevcut bir bileşen için test yazmayı da içerir. Bir projede @ui-sdk/*... bulunduğunda kullanın.
testingdesigndevelopment
workers-development
cloudflare
Yerel geliştirme sırasında cf dev, wrangler dev veya Cloudflare Vite eklentisiyle Cloudflare Workers’ı çalıştırın, inceleyin ve hata ayıklayın; binding verilerini okumak ve başlangıç verileri eklemek, ayrıca yerel izleri ve günlükleri sorgulamak için Local Explorer’ı kullanın. Üretim ortamındaki hata ayıklama işlemlerini de Workers observability’ye yönlendirir. Projenin Wrangler kullanıp kullanmadığına bakılmaksızın isteklerde hata ayıklamak için kullanın.
devopstestingdevelopment
workers-profiling
cloudflare
Dağıtılmış Cloudflare Workers ve Durable Objects'ta CPU kullanımını ve bellek tahsisini profilleyin veya hata ayıklayın. Ardından kodunuzu optimize etmek için bu bilgileri kullanın.
devopstestingdevelopment
accessibility
addyosmani
WCAG 2.2 yönergelerini takip ederek web erişilebilirliğini denetleyin ve iyileştirin. "Erişilebilirliği iyileştir", "a11y denetimi", "WCAG uyumluluğu", "ekran okuyucu desteği", "klavye navigasyonu" veya "erişilebilir hale getir" istendiğinde kullanın.
developmenttestingcode-review
accessibility-engineering
addyosmani
Mevcut arayüzleri WCAG 2.2 AA uyumluluğu açısından denetler ve bulunan ihlalleri giderir. Bir sayfa veya bileşenin erişilebilirliğini denetlerken, axe-core ya da pa11y çalıştırırken, a11y ihlallerini önceliklendirirken veya yayına almadan önce ekran okuyucu ve kontrast sorunlarını kontrol ederken kullanın.
developmenttestingdesign
audit-website
squirrelscan
Bir web sitesini squirrelscan CLI ile denetleyin ve bulguları kodda düzeltin. SEO, performans, güvenlik, teknik, içerik, erişilebilirlik ve 15 diğer kural kategorisini (249+ kural) çalıştırır, LLM-optimize edilmiş bir rapor döndürür, ardından sorunları kaynak dosyalarla eşleyen, düzeltmeler uygulayan ve site iyi puan alana kadar yeniden denetleyen yinelemeli bir düzeltme döngüsü yürütür. Web sitesi veya web uygulaması sorunlarını keşfetmek, değerlendirmek ve düzeltilene kadar yönlendirmek için kullanın.
developmenttestingweb-scraping
better-accessibility
jakubkrehel
WCAG 2.2’ye göre klavye ve odak davranışını, ARIA’yı, erişilebilir adları, formları, ekran okuyucu duyurularını, hareketi ve yakınlaştırmayı inceler ve düzeltir.
developmenttestingcode-review