What problem does it solve?
Testing complex frontend and server flows without confidence leads to regressions, brittle changes, and low coverage that hides real bugs.
Core Features & Use Cases
- What to test: Focus on business logic, utilities, data transformers (unit), and key flows such as adding budget items or creating projects (integration).
- How to test: Use Vitest as the runner and React Testing Library for UI behavior, while avoiding testing framework internals or third-party library behavior.
- Coverage and verification: Set a coverage goal of at least 85% for new code and review reports to identify untested branches.
- Mocking strategy: Mock Supabase/auth and API-route boundary dependencies using existing helpers in src/test/mocks/supabase.ts (createMockUser, createMockSession, mockSupabase, mockSupabaseAuth).
- Edge-case resilience: Include empty states, invalid inputs, and error paths (e.g., Supabase error returns), plus form validation success/failure scenarios.
Quick Start
Use the veta-testing skill to create a Vitest + React Testing Library test for a budget flow, mocking Supabase at the boundary and ensuring the new code meets the 85% coverage target.