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.0.1, generated at 2026-09-25.

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

snowflake-semanticview
github
Snowflake CLI का उपयोग करके Snowflake सिमैंटिक व्यू बनाएं और मान्य करें, जिसमें निर्देशित DDL निर्माण और परीक्षण शामिल है। यह पूर्ण सिमैंटिक व्यू जीवनचक्र को संभालता है: DDL का मसौदा तैयार करना, Snowflake तालिका मेटाडेटा से समानार्थी शब्द और टिप्पणियाँ भरना, CLI के माध्यम से Snowflake के विरुद्ध मान्य करना, और अंतिम CREATE या ALTER स्टेटमेंट निष्पादित करना। एक बार Snowflake CLI स्थापना और कनेक्शन सेटअप की आवश्यकता होती है; आगे बढ़ने से पह
creating-an-endpoint
posthog
पहली कोशिश में सही आकार के साथ PostHog एंडपॉइंट बनाएं — इसमें क्वेरी प्रकार का चयन, नामकरण परंपराएं, और चर के रूप में क्या उजागर करें (HogQL code_name बनाम…) शामिल है।
apify-influencer-discovery
apify
इंस्टाग्राम, फेसबुक, यूट्यूब और टिकटॉक पर ब्रांड पार्टनरशिप के लिए इन्फ्लुएंसर खोजें और उनका मूल्यांकन करें, प्रामाणिकता सत्यापित करें, और सहयोग प्रदर्शन को ट्रैक करें।
huggingface-papers
huggingface
हगिंग फेस पेपर पेजों को मार्कडाउन में खोजें और पढ़ें, और लेखकों, लिंक किए गए मॉडल/डेटासेट/स्पेस, गिटहब आदि जैसी संरचित मेटाडेटा के लिए पेपर्स API का उपयोग करें।
design-an-interface
mattpocock
एक मॉड्यूल के लिए समानांतर उप-एजेंटों का उपयोग करके कई मौलिक रूप से भिन्न इंटरफ़ेस डिज़ाइन तैयार करें। इसका उपयोग तब करें जब उपयोगकर्ता कोई API डिज़ाइन करना चाहता हो, इंटरफ़ेस विकल्पों का अन्वेषण करना चाहता हो, मॉड्यूल आकारों की तुलना करना चाहता हो, या "इसे दो बार डिज़ाइन करें" का उल्लेख करता हो।
developmentdesignapi
dbs-content-system
dontbesilent2025
dontbesilent 内容结构化系统。将本地大量文稿、推文、选题、案例和课程稿搭建成一个可持续生长的内容结构化工程:先审计内容规模与边界,再建立新工程、复制素材、抽取内容单元、生成主题地图与选题装配稿。触发方式:/dbs-content-system、/内容结构化系统、「把我的内容做成结构化系统」「把本地素材变成可重组系统」「帮我搭内容资产工程」「我想把旧内容变成可复用资产」Content structuring system. Audits local content volume, then builds a reusable content knowledge project with units, topic maps, and assembly drafts. Trigger: /dbs-content-system, "build a content structuring system", "turn my archive into reusable assets
developmentdata-analysisdocument
asset-audit
webflow
वेबफ्लो साइट पर एसेट्स का SEO अनुकूलन के लिए विश्लेषण करें। उन एसेट्स की पहचान करें जिनमें ऑल्ट टेक्स्ट गायब है और जिनके नाम SEO-अनुकूल नहीं हैं, फिर उत्पन्न करें और लागू करें…
dev-workflow
contentstack
Gradle कार्यों, CI, रिलीज़ प्रकाशन, और contentstack-android में ब्रांच प्रवाह के लिए उपयोग करें।