vitest

द्वारा antfu

Vite द्वारा संचालित तेज़ यूनिट टेस्टिंग फ्रेमवर्क जिसमें Jest-संगत API है। टेस्ट लिखने, मॉकिंग, कवरेज कॉन्फ़िगर करने, या टेस्ट फ़िल्टरिंग और फिक्स्चर के साथ काम करते समय उपयोग करें।

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

संबंधित Skills

agent-observability-eval-pipeline
datadog-labs
एंड-टू-एंड एजेंट ऑब्ज़र्वेबिलिटी पाइपलाइन एक इंस्ट्रूमेंटेड ml_app के लिए — उत्पादन ट्रेस को वर्गीकृत करें, रूट-कॉज़ विफलताओं को पहचानें, बूटस्ट्रैप मूल्यांकनकर्ता, फिर (वैकल्पिक रूप से)…
official
nuxt-test-utils-skilld
nuxt
जब "@nuxt/test-utils" को आयात करने वाला कोड लिखें तो हमेशा उपयोग करें। @nuxt/test-utils, nuxt/test-utils, nuxt… के डिबगिंग, सर्वोत्तम प्रथाओं या संशोधन के लिए परामर्श लें।
official
code-review
flutter
वर्तमान डिफ या git परिवर्तनों पर स्टाइलगाइड और सॉफ्टवेयर इंजीनियरिंग की सर्वोत्तम प्रथाओं के विरुद्ध एक पांडित्यपूर्ण, बहु-दृष्टिकोण कोड समीक्षा करें।
official
fix-dependabot
remotion-dev
Dependabot PR को ठीक करें, सभी मोनोरेपो इंस्टेंसेस में डिपेंडेंसी अपडेट करें, bun install चलाएँ और पुश करें
official
simready-foundation-create-package
nvidia
SimReady पैकेज बनाने के लिए उपयोग करें, जिसमें पैकेज सैंपल स्क्रिप्ट, WRAPP सेटअप, रूट USD इनपुट, वैलिडेशन चरण और फॉलबैक मोड शामिल हैं।
official
binary-size-analysis
facebook
एक git कमिट रेंज में hermesvm साझा लाइब्रेरी के प्रति-कमिट बाइनरी आकार परिवर्तनों का विश्लेषण करता है। प्रति-कमिट आकार और महत्वपूर्ण वृद्धि और कमी की सारांश तालिकाओं के साथ एक मार्कडाउन रिपोर्ट तैयार करता है।
official
agents-sdk
openai
Codex से OpenAI Agents SDK ऐप्स बनाएँ, चलाएँ, तैनात करें और मूल्यांकन करें। जब उपयोगकर्ता Agents SDK ऐप बनाने या अनुकूलित करने, प्रॉम्प्ट या Codex से बिल्ड करने के लिए कहे तब उपयोग करें…
official
add-geolocation
microsoft
Internal implementation skill invoked by /add-native for native background GPS tracking with durable storage and Dataverse sync using…
official