vitest
द्वारा sanity-io
Vite द्वारा संचालित तीव्र यूनिट परीक्षण फ्रेमवर्क जिसमें Jest-संगत API है। परीक्षण लिखने, मॉकिंग करने, कवरेज कॉन्फ़िगर करने या परीक्षण के साथ काम करते समय उपयोग करें।
npx skills add https://github.com/sanity-io/next-sanity --skill vitestVitest 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 3.x, generated at 2026-01-28.
Core
| Topic | Description | Reference |
|---|---|---|
| Configuration | Vitest and Vite config integration, defineConfig usage | core-config |
| CLI | Command line interface, commands and options | core-cli |
| Test API | test/it function, modifiers like skip, only, concurrent | core-test-api |
| Describe API | describe/suite for grouping tests and nested suites | core-describe |
| Expect API | Assertions with toBe, toEqual, matchers and asymmetric matchers | core-expect |
| Hooks | beforeEach, afterEach, beforeAll, afterAll, aroundEach | core-hooks |
Features
| Topic | Description | Reference |
|---|---|---|
| Mocking | Mock functions, modules, timers, dates with vi utilities | features-mocking |
| Snapshots | Snapshot testing with toMatchSnapshot and inline snapshots | features-snapshots |
| Coverage | Code coverage with V8 or Istanbul providers | features-coverage |
| Test Context | Test fixtures, context.expect, test.extend for custom fixtures | features-context |
| Concurrency | Concurrent tests, parallel execution, sharding | features-concurrency |
| Filtering | Filter tests by name, file patterns, tags | features-filtering |
Advanced
| Topic | Description | Reference |
|---|---|---|
| Vi Utilities | vi helper: mock, spyOn, fake timers, hoisted, waitFor | advanced-vi |
| Environments | Test environments: node, jsdom, happy-dom, custom | advanced-environments |
| Type Testing | Type-level testing with expectTypeOf and assertType | advanced-type-testing |
| Projects | Multi-project workspaces, different configs per project | advanced-projects |
sanity-io की और Skills
sanity-migration
sanity-io
अन्य CMS और सामग्री प्रणालियों से Sanity में माइग्रेशन की योजना बनाता है, उन्हें कार्यान्वित करता है और उनकी समीक्षा करता है। AEM, Adobe Experience Manager, Contentful, Strapi, Webflow, WordPress, Payload, Drupal, Markdown/MDX/frontmatter फ़ाइलों, WXR/XML निर्यात, CMS API, डेटाबेस डंप, स्थिर HTML से Sanity में माइग्रेट या रीप्लेटफ़ॉर्म करते समय, या निष्कर्षण, रूपांतरण, Portable Text रूपांतरण, एसेट माइग्रेशन, रीडायरेक्ट, सत्यापन और कटओवर वर्कफ़्लो डिज़
officialdevelopmentdatabase
create-agent-with-sanity-context
sanity-io
एजेंट कॉन्टेक्स्ट के माध्यम से सैनिटी सामग्री तक संरचित पहुंच के साथ AI एजेंट बनाएं। सैनिटी-संचालित चैटबॉट सेट अप करते समय, AI सहायक को सैनिटी से कनेक्ट करते समय उपयोग करें…
official
dial-your-context
sanity-io
सैनिटी एजेंट कॉन्टेक्स्ट MCP के लिए इंस्ट्रक्शंस फील्ड सामग्री बनाने हेतु इंटरैक्टिव सत्र। इस कौशल का उपयोग तब करें जब उपयोगकर्ता एजेंट कॉन्टेक्स्ट को ट्यून करने, सुधारने का उल्लेख करें…
official
optimize-agent-prompt
sanity-io
अपने Sanity Agent Context एजेंट को निर्देशित वार्तालाप के माध्यम से ट्यून करें। अन्वेषण डेटा को उत्पादन-तैयार निर्देशों में बदलता है और एक सिस्टम प्रॉम्प्ट तैयार करता है…
official
shape-your-agent
sanity-io
सैनिटी एजेंट कॉन्टेक्स्ट MCP द्वारा संचालित AI एजेंट के लिए सिस्टम प्रॉम्प्ट तैयार करने हेतु इंटरैक्टिव सत्र। इस कौशल का उपयोग तब करें जब उपयोगकर्ता एजेंट के व्यक्तित्व को परिभाषित करना चाहते हैं,…
official
content-experimentation-best-practices
sanity-io
सामग्री प्रयोगों को डिज़ाइन करने, निष्पादित करने और विश्लेषण करने के लिए संरचित मार्गदर्शन, जो रूपांतरण और जुड़ाव को बेहतर बनाने में सहायक हो। इसमें परिकल्पना ढाँचे, मीट्रिक चयन, नमूना आकार गणना, और A/B तथा बहुभिन्नरूपी प्रयोगों में सांख्यिकीय महत्व परीक्षण शामिल है। p-मान, विश्वास अंतराल, शक्ति विश्लेषण, और परिणामों की व्याख्या के लिए बायेसियन विधियों पर विस्तृत संसाधन प्रदान करता है। फ़ील्ड स्तर पर वे
official
content-modeling-best-practices
sanity-io
संरचित सामग्री मॉडलिंग मार्गदर्शन: स्कीमा डिज़ाइन, पुन: प्रयोज्यता और बहु-चैनल वितरण के लिए। मुख्य सिद्धांतों को शामिल करता है: सामग्री को पृष्ठों के बजाय डेटा के रूप में मानना, एकल स्रोत सत्य बनाए रखना, भविष्य के चैनलों के लिए डिज़ाइन करना और संपादक वर्कफ़्लो को अनुकूलित करना। संदर्भ बनाम एम्बेडेड ऑब्जेक्ट, चिंताओं का पृथक्करण और सामग्री पुन: उपयोग पैटर्न के लिए निर्ण
official
portable-text-conversion
sanity-io
HTML और Markdown सामग्री को Sanity के लिए Portable Text ब्लॉक में बदलें। लीगेसी CMS से सामग्री माइग्रेट करते समय, Sanity में HTML या Markdown आयात करते समय उपयोग करें,…
official