vitest-skilld

Diagnose and fix issues in Vitest test suites with debugging strategies.

542|49|Updated Dec 14, 2022
One-click install
npx skills add https://github.com/nuxt-modules/og-image --skill vitest-skilld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vitest-skilld
Source: https://github.com/nuxt-modules/og-image/tree/main/.claude/skills/vitest-skilld
Command: npx skills add https://github.com/nuxt-modules/og-image --skill vitest-skilld

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing tests with Vitest can be time-consuming and error-prone; this Skill guides you through debugging, best practices, and safe modification patterns.

Core Features & Use Cases

  • Debugging guidance: targeted strategies to identify and fix failing Vitest tests quickly.
  • Best practices: recommended patterns for mocks, setup files, isolation, and assertions.
  • How to modify Vitest: safe configuration tweaks and advanced usage for complex test suites.

Quick Start

Ask this skill to debug a failing Vitest test and propose targeted patterns.

Frequently Asked Questions about vitest-skilld

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug failing Vitest unit tests in a TypeScript project?

Fix failing Vitest unit tests by applying targeted debugging strategies to identify error patterns, verify mock configurations, and ensure proper test isolation within your TypeScript or JavaScript project.

What are the best practices for mocking modules in Vitest?

Best practices for mocking in Vitest involve using recommended patterns for setup files, ensuring test isolation, and applying safe configuration tweaks to maintain reliable and maintainable test suites.

How do I configure Vitest for complex integration test suites?

Configure Vitest for complex integration suites by applying safe configuration tweaks and advanced usage patterns that ensure reliable test execution across your JavaScript or TypeScript project setup.

Why are my Vitest tests failing due to state leakage between test files?

Vitest tests fail from state leakage when test isolation is improperly configured; resolve this by applying recommended mock strategies and setup file patterns to ensure a clean environment.

Does this guidance apply to both JavaScript and TypeScript Vitest environments?

Yes, this guidance applies to projects using Vitest for unit and integration tests in both JavaScript and TypeScript environments, covering setup, mocks, assertions, and configuration.