Unit & Component Testing (Vitest + RTL) (Frontend Standard)
What to test
- Component rendering and behavior
- Accessibility basics (labels, roles, keyboard where relevant)
- Feature flows at the component boundary
What not to test
- Implementation details (private state, internal function calls) unless required
Mocking network
- UI code should call the BFF only. Mock BFF calls in tests at the fetch/client boundary (project-specific implementation).