testing-web
Installation
SKILL.md
testing-web — fast, trustworthy component and hook tests
A frontend test is only worth keeping if it survives a refactor and fails for the right reason.
The way to get there is boring and non-negotiable: render the thing, query it the way a user finds
it, drive it with real events, and assert on what the user can see. Everything in this skill bends
toward that. Tests that reach into className, state, props, or instance methods pass while the UI
is broken and break while the UI is fine — delete that instinct.
What this owns / what it doesn't
This skill owns unit, component, and custom-hook tests that run in a simulated DOM (jsdom) or Vitest Browser Mode at component granularity. The moment scope crosses a boundary, switch skills:
- Real browser driving a whole app, page navigation, multi-page login-to-dashboard journeys ->
../e2e-testing/SKILL.md. - pytest / fixtures / Python suites ->
../testing-py/SKILL.md. - axe runs, contrast ratios, keyboard-nav auditing as the goal ->
../accessibility/SKILL.md. (You will use role queries here; auditing is not the job.) - Render/runtime perf, re-render counts, web vitals ->
../debug/SKILL.mdfor diagnosis. - How to build the component in the first place ->
../react/SKILL.mdor../nextjs/SKILL.md.