This guide helps you write and run tests using Vitest. It covers everything from running a single test file to fixing failing tests and improving coverage. You will learn the core principles like preferring vi.spyOn over vi.mock and testing behavior instead of implementation details.
Developers working on the LobeHub project can follow the quick commands to run tests in the database package or the main app. The guide also explains how to handle database models, mocks, and regression tests. It is designed to save time by avoiding slow commands that run all tests.
When tests fail due to changes in the code, this guide helps you decide whether to update the test or delete it. It keeps your test suite healthy and fast. Use the reference files for deeper examples on specific topics like Electron IPC or Zustand stores.
Global
mkdir -p ~/.claude/skills/testingProject
mkdir -p .claude/skills/testingSource Repository
Grill Memattpocock/skills
Stress-test your plan with relentless questions until we both understand
Tddmattpocock/skills
Write one test at a time then code to make it pass
Test Driven Developmentobra/superpowers
Write a failing test first then code just enough to pass
Qamattpocock/skills
Turn bug reports into GitHub issues through natural conversation without technical fuss
Migrate To Shoehornmattpocock/skills
Replace unsafe as assertions with type-safe partial test data easily
Webapp Testinganthropics/skills
Test your local web apps quickly with Playwright automation and screenshots
Playwright Best Practicescurrents-dev/playwright-best-practices-skill
Master Playwright testing with best practices for reliable and fast tests
Google Agents Cli Evalgoogle/agents-cli
Run evaluations on your AI agent, find failures, and improve its quality step by step