write-vitest

Community

Craft robust Vitest tests that enforce standards

Authorsswapnil2
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Writing tests that verify core logic, hooks, and UI components using Vitest often lacks standardized patterns. This Skill provides a clear approach to structure unit, hook, and component tests for React/Next and SvelteKit apps, ensuring consistent test quality and maintainability.

Core Features & Use Cases

  • Unit tests: test pure functions with parameterized cases to cover edge conditions.
  • Hook tests: isolate React hooks with proper test utilities and providers.
  • Component tests: verify React and Svelte components using Testing Library patterns and a11y checks.
  • Guardrails: enforce no snapshot tests for dynamic UI, use MSW for API interactions, and include accessibility checks.

Quick Start

Create a test file beside the module (foo.test.tsx / Foo.test.ts) and run pnpm test <file> to execute the tests.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: write-vitest
Download link: https://github.com/sswapnil2/ai-config-fintech/archive/main.zip#write-vitest

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.