testing

Write, organize, and debug Vitest tests with file conventions and targeted runs.

Updated Feb 1, 2026
One-click install
npx skills add https://github.com/Chenm4/VoiceChatAssistant --skill testing-chenm4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/Chenm4/VoiceChatAssistant/tree/main/lobehub-main/.agents/skills/testing
Command: npx skills add https://github.com/Chenm4/VoiceChatAssistant --skill testing-chenm4

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill provides a structured guide for writing and maintaining tests with Vitest, reducing debugging time and improving test coverage.

Core Features & Use Cases

  • Clear conventions for test file organization (e.g., .test.ts, .test.tsx) and naming.
  • Guidance on running targeted tests and avoiding full-suite runs to save time.
  • Best practices for mocking, test isolation, and debugging across web and desktop codebases.

Quick Start

Create a new test following the conventions, and run a targeted test using bunx vitest run --silent='passed-only' '[file-path]'.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I run targeted Vitest unit tests without executing the full test suite?

Vitest mocking isolates dependencies during unit testing by replacing functions or modules with controlled substitutes, ensuring test isolation across web and desktop codebases for reliable debugging.

What naming conventions should I use for organizing TypeScript test files?

Organize TypeScript test files using `.test.ts` for logic and `.test.tsx` for React components, applying clear naming conventions to maintain structure and improve test coverage discoverability.

Can I use Vitest for debugging tests across both web and desktop codebases?

Mocking in Vitest replaces module dependencies with controlled stubs to isolate test execution, preventing external side effects and ensuring reliable debugging across web and desktop codebases.

What is the best way to structure mocking and test isolation in Vitest?

Vitest mocking isolates dependencies during unit testing by replacing functions or modules with controlled substitutes, ensuring test isolation across web and desktop codebases for reliable debugging.

Why do my Vitest unit tests fail to isolate dependencies across web and desktop codebases?

Vitest unit tests fail isolation without proper mocking practices, requiring you to replace module dependencies with controlled substitutes to prevent external side effects during execution.