What problem does it solve?
Testing code that touches Supabase, React components, hooks, and service logic is easy to get wrong, leading to brittle suites, flaky behavior, and unverified edge cases.
Core Features & Use Cases
- Testing priority that maximizes ROI: start with pure utils and Zod schemas, then move to services, hooks, components, and finally API/Supabase integrations.
- Vitest best practices for reliable outcomes: use clear AAA (Arrange/Act/Assert) structure, descriptive test names, and keep tests independent.
- React Testing Library approach: query by role and label first to validate user-facing behavior rather than internal implementation.
- Supabase mocking strategy: mock the Supabase client module and control resolved values to test business logic deterministically.
- Hook and component behavior testing: validate hook state transitions via
renderHook and simulate user flows with userEvent.
Quick Start
Ask the skill: "I need to add unit or integration tests for this new hook/service/component—what should I test first, how should the test be structured, and how do I mock Supabase for deterministic assertions?"