testing

Organize Vitest tests across frontend, backend, and desktop projects.

Updated May 11, 2026
One-click install
npx skills add https://github.com/zmh13928433602-sys/lobe-chat --skill testing-zmh13928433602-sys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/zmh13928433602-sys/lobe-chat/tree/main/.agents/skills/testing
Command: npx skills add https://github.com/zmh13928433602-sys/lobe-chat --skill testing-zmh13928433602-sys

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps developers implement and maintain Vitest-based tests efficiently, reducing debugging time and ensuring robust test coverage.

Core Features & Use Cases

  • Structured guidance for organizing tests across projects (Webapp, Packages, Desktop)
  • Practical patterns for mocking, stubbing, and test isolation to improve reliability
  • Comprehensive examples covering unit, integration, and end-to-end-type flavors within a Vitest workflow

Quick Start

Run your Vitest tests locally with bunx vitest run --silent='passed-only' to get focused results.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I organize Vitest tests across different project types like frontend and desktop apps?

To organize Vitest tests across frontend, backend, and desktop apps, use structured guidance to group tests by project type. This approach ensures robust coverage, improves reliability, and maintains test discipline across different project environments.

What are the best practices for mocking and stubbing in Vitest to ensure test isolation?

Vitest mocking and stubbing best practices involve applying practical patterns for test isolation to improve reliability. Properly isolating tests prevents cross-test interference and ensures unit, integration, and end-to-end workflows execute consistently.

How do I run focused Vitest tests locally to get only passing results?

To run focused Vitest tests locally and see only passing results, execute the command `bunx vitest run --silent='passed-only'`. This filters output to help developers quickly verify successful test completions without noisy console logs.

Does this Vitest testing guide support TypeScript projects?

Yes, this Vitest testing guide supports TypeScript projects. It provides structured guidance, mock patterns, and best practices tailored for TypeScript workflows, helping you improve test quality and debugging efficiency.

Why does my Vitest debugging process take so long and how can I improve it?

Vitest debugging takes long when tests lack proper isolation and structured organization. You can improve debugging efficiency by applying practical mocking patterns, stubbing techniques, and test discipline best practices to quickly isolate failures.

What is the best way to cover unit, integration, and end-to-end tests in a single Vitest workflow?

The best way to cover multiple test flavors in a Vitest workflow is to use comprehensive examples that integrate unit, integration, and end-to-end-type tests. This structured approach reduces debugging time and ensures robust coverage.