What problem does it solve?
Frontend testing becomes slow and brittle when tests split into unclear unit vs integration layers, rely on fragile mocks, or fail to validate the real user experience of React components and hooks.
Core Features & Use Cases
- Testing Library first: write tests from the user’s observable behavior using real rendering and a single consistent test filename pattern.
- Fake-first strategy for hard dependencies: use fakes for external systems (Socket.IO, browser APIs, time, CLI/network boundaries) and use spies/partial mocks for internal observation.
- Fake components for React subcomponent isolation: replace child components with
Fake<Name> implementations that preserve prop typing and expose test-friendly signals.
- Correct query priority: prefer role/label/placeholder/text queries before falling back to test ids.
- Choose the right test surface: use Storybook play functions for visual/interactive demos and Vitest + testing-library for correctness and regression.
Quick Start
Use the frontend-testing skill to decide the right test double approach and testing-library query style while writing React component, hook, or store tests.