{"id":"496874b5-ab8a-47f5-8bde-fe23c3d692ea","shortId":"pBsuDM","kind":"skill","title":"Vitest","tagline":"Skills skill by Antfu","description":"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.\n\n**Key Features:**\n- Vite-native: Uses Vite's transformation pipeline for fast HMR-like test updates\n- Jest-compatible: Drop-in replacement for most Jest test suites\n- Smart watch mode: Only reruns affected tests based on module graph\n- Native ESM, TypeScript, JSX support without configuration\n- Multi-threaded workers for parallel test execution\n- Built-in coverage via V8 or Istanbul\n- Snapshot testing, mocking, and spy utilities\n\n> The skill is based on Vitest 3.x, generated at 2026-01-28.\n\n## Core\n\n| Topic | Description | Reference |\n|-------|-------------|-----------|\n| Configuration | Vitest and Vite config integration, defineConfig usage | [core-config](references/core-config.md) |\n| CLI | Command line interface, commands and options | [core-cli](references/core-cli.md) |\n| Test API | test/it function, modifiers like skip, only, concurrent | [core-test-api](references/core-test-api.md) |\n| Describe API | describe/suite for grouping tests and nested suites | [core-describe](references/core-describe.md) |\n| Expect API | Assertions with toBe, toEqual, matchers and asymmetric matchers | [core-expect](references/core-expect.md) |\n| Hooks | beforeEach, afterEach, beforeAll, afterAll, aroundEach | [core-hooks](references/core-hooks.md) |\n\n## Features\n\n| Topic | Description | Reference |\n|-------|-------------|-----------|\n| Mocking | Mock functions, modules, timers, dates with vi utilities | [features-mocking](references/features-mocking.md) |\n| Snapshots | Snapshot testing with toMatchSnapshot and inline snapshots | [features-snapshots](references/features-snapshots.md) |\n| Coverage | Code coverage with V8 or Istanbul providers | [features-coverage](references/features-coverage.md) |\n| Test Context | Test fixtures, context.expect, test.extend for custom fixtures | [features-context](references/features-context.md) |\n| Concurrency | Concurrent tests, parallel execution, sharding | [features-concurrency](references/features-concurrency.md) |\n| Filtering | Filter tests by name, file patterns, tags | [features-filtering](references/features-filtering.md) |\n\n## Advanced\n\n| Topic | Description | Reference |\n|-------|-------------|-----------|\n| Vi Utilities | vi helper: mock, spyOn, fake timers, hoisted, waitFor | [advanced-vi](references/advanced-vi.md) |\n| Environments | Test environments: node, jsdom, happy-dom, custom | [advanced-environments](references/advanced-environments.md) |\n| Type Testing | Type-level testing with expectTypeOf and assertType | [advanced-type-testing](references/advanced-type-testing.md) |\n| Projects | Multi-project workspaces, different configs per project | [advanced-projects](references/advanced-projects.md) |","tags":["vitest","skills","antfu"],"capabilities":["skill","source-antfu","category-skills"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/antfu/skills/vitest","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"install_from":"skills.sh"}},"qualityScore":"0.300","qualityRationale":"deterministic score 0.30 from registry signals: · indexed on skills.sh · published under antfu/skills","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill:v1","enrichmentVersion":1,"enrichedAt":"2026-04-23T23:40:15.031Z","embedding":null,"createdAt":"2026-04-18T20:24:32.553Z","updatedAt":"2026-04-23T23:40:15.031Z","lastSeenAt":"2026-04-23T23:40:15.031Z","tsv":"'-01':128 '-28':129 '2026':127 '3':123 'advanc':284,299,312,326,340 'advanced-environ':311 'advanced-project':339 'advanced-type-test':325 'advanced-vi':298 'affect':82 'afteral':202 'aftereach':200 'antfu':5 'api':23,158,169,172,185 'app':47 'aroundeach':203 'assert':186 'asserttyp':324 'asymmetr':192 'base':84,120 'beforeal':201 'beforeeach':199 'box':34 'built':104 'built-in':103 'category-skills' 'cli':146,155 'code':238 'command':147,150 'compat':22,67 'concurr':165,262,263,270 'config':39,138,144,336 'configur':94,134 'context':250,260 'context.expect':253 'core':130,143,154,167,181,195,205 'core-c':153 'core-config':142 'core-describ':180 'core-expect':194 'core-hook':204 'core-test-api':166 'coverag':106,237,239,247 'custom':256,310 'date':217 'defineconfig':140 'describ':171,182 'describe/suite':173 'descript':132,210,286 'differ':335 'dom':309 'drop':69 'drop-in':68 'environ':302,304,313 'esm':26,89 'execut':102,266 'expect':184,196 'expecttypeof':322 'fake':294 'fast':59 'featur':49,208,222,234,246,259,269,281 'features-concurr':268 'features-context':258 'features-coverag':245 'features-filt':280 'features-mock':221 'features-snapshot':233 'file':277 'filter':272,273,282 'fixtur':252,257 'framework':13 'function':160,214 'generat':11,125 'graph':87 'group':175 'happi':308 'happy-dom':307 'helper':291 'hmr':61 'hmr-like':60 'hoist':296 'hook':198,206 'inlin':231 'integr':139 'interfac':149 'istanbul':110,243 'jest':21,66,74 'jest-compat':20,65 'jsdom':306 'jsx':29,91 'key':48 'level':319 'like':62,162 'line':148 'matcher':190,193 'mock':113,212,213,223,292 'mode':79 'modifi':161 'modul':86,215 'multi':96,332 'multi-project':331 'multi-thread':95 'name':276 'nativ':25,52,88 'nest':178 'next':10 'next-gener':9 'node':305 'option':152 'parallel':100,265 'pattern':278 'per':337 'pipelin':57 'plugin':43 'power':14 'project':330,333,338,341 'provid':18,244 'refer':133,211,287 'references/advanced-environments.md':314 'references/advanced-projects.md':342 'references/advanced-type-testing.md':329 'references/advanced-vi.md':301 'references/core-cli.md':156 'references/core-config.md':145 'references/core-describe.md':183 'references/core-expect.md':197 'references/core-hooks.md':207 'references/core-test-api.md':170 'references/features-concurrency.md':271 'references/features-context.md':261 'references/features-coverage.md':248 'references/features-filtering.md':283 'references/features-mocking.md':224 'references/features-snapshots.md':236 'replac':71 'rerun':81 'resolv':41 'shard':267 'share':36 'skill':2,3,118 'skip':163 'smart':77 'snapshot':111,225,226,232,235 'source-antfu' 'spi':115 'spyon':293 'suit':76,179 'support':30,92 'tag':279 'test':12,63,75,83,101,112,157,168,176,227,249,251,264,274,303,316,320,328 'test.extend':254 'test/it':159 'thread':97 'timer':216,295 'tobe':188 'toequal':189 'tomatchsnapshot':229 'topic':131,209,285 'transform':40,56 'type':315,318,327 'type-level':317 'typescript':27,90 'updat':64 'usag':141 'use':53 'util':116,220,289 'v8':108,241 'vi':219,288,290,300 'via':107 'vite':16,46,51,54,137 'vite-n':50 'vitest':1,6,35,122,135 'waitfor':297 'watch':78 'without':93 'worker':98 'workspac':334 'x':124","prices":[{"id":"90aeee81-6c67-4792-bdbc-823a7a66f359","listingId":"496874b5-ab8a-47f5-8bde-fe23c3d692ea","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"antfu","category":"skills","install_from":"skills.sh"},"createdAt":"2026-04-18T20:24:32.553Z"}],"sources":[{"listingId":"496874b5-ab8a-47f5-8bde-fe23c3d692ea","source":"github","sourceId":"antfu/skills/vitest","sourceUrl":"https://github.com/antfu/skills/tree/main/skills/vitest","isPrimary":false,"firstSeenAt":"2026-04-18T21:53:53.086Z","lastSeenAt":"2026-04-23T18:53:30.017Z"},{"listingId":"496874b5-ab8a-47f5-8bde-fe23c3d692ea","source":"skills_sh","sourceId":"antfu/skills/vitest","sourceUrl":"https://skills.sh/antfu/skills/vitest","isPrimary":true,"firstSeenAt":"2026-04-18T20:24:32.553Z","lastSeenAt":"2026-04-23T23:40:15.031Z"}],"details":{"listingId":"496874b5-ab8a-47f5-8bde-fe23c3d692ea","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"antfu","slug":"vitest","source":"skills_sh","category":"skills","skills_sh_url":"https://skills.sh/antfu/skills/vitest"},"updatedAt":"2026-04-23T23:40:15.031Z"}}