React Testing
Behavior-focused React component, hook, and page tests with RTL, MSW mocking, and axe accessibility checks.
- CCM score
- 75 of 100
- skills.sh installs
- 8.5K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers query priority,
userEventinteractions, async patterns, custom hook testing, and provider wrapping for components and hooks - Includes MSW setup with
onUnhandledRequest: "error", per-test handler overrides, and axe assertions viajest-axeorvitest-axe - Guides the choice between Vitest, Jest, Playwright Component Testing, and Cypress Component Testing, and the boundary with end-to-end runs
- Designed for teams writing or fixing React tests who need guidance on when snapshot tests and E2E runs are the wrong tool
Install
$ npx -y skills add affaan-m/ecc --skill react-testing -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
React Testing
Comprehensive React testing patterns for behavior-focused component tests, custom hook tests, accessibility assertions, and network-level mocking.
When to Activate
- Writing tests for React components, custom hooks, or pages
- Adding test coverage to legacy untested components
- Migrating from Enzyme or class-component-era patterns to React Testing Library
- Setting up Vitest or Jest for a new React project
- Mocking HTTP requests in tests
- Asserting accessibility violations
- Deciding which tests belong in RTL vs Playwright Component Testing vs full E2E
Core Principle
Test what the user sees and does, not implementation details.
A test should:
- Render the component with the same providers it has in production
- Interact with it via accessible queries (role, label) and
userEvent - Assert visible output and observable side effects (callback fired, request sent)
A test should NOT:
- Inspect component state, props passed to children, or which hooks were called
- Mock React itself or framework hooks
- Assert on the number of renders or DOM structure beyond what affects users
Library Choice
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Testing & QA, Frontend & UI Code
- First seen
- Jul 14, 2026
Questions
What does the react-testing skill do for Claude Code?
The react-testing skill guides agents through writing and fixing tests for React components, custom hooks, and pages using React Testing Library and Vitest or Jest. It covers network mocking with MSW, accessibility assertions with axe, and when a test belongs in React Testing Library versus Playwright or Cypress end-to-end runs.
How do I install the react-testing skill?
Run npx -y skills add affaan-m/ecc --skill react-testing -y in your project. Once installed, the agent can write and repair React component, hook, and page tests following the skill's patterns.
Which skills does react-testing sit beside in the Testing & QA category?
React-testing ranks in the top 100 of the Testing & QA category on Claude Marketplaces, alongside tdd, test-driven-development, webapp-testing, and break-ui. It focuses on behavior-focused React component tests rather than general test-driven workflows or browser-level web app testing.
Do I need Playwright or Cypress to use react-testing?
No, the skill is built around React Testing Library with Vitest or Jest running in JSDOM. Playwright or Cypress component testing is only needed when a real browser engine is required, and the skill advises against mixing both runners in one repo without a clear split.
More from affaan-m/ecc
All 257- React Performance8.5K
- Frontend A11y8.4K
- Recsys Pipeline Architect8.2K
- Marketing Campaign8.1K
- Uncloud8.1K
- Benchmark Optimization Loop7.8K
- Social Publisher7.8K
- Latency Critical Systems7.8K
- Parallel Execution Optimizer7.7K
- Prediction Market Risk Review7.7K
- Data Throughput Accelerator7.7K
- Prediction Market Oracle Research7.7K
- Recursive Decision Ledger7.7K
- Team Agent Orchestration7.3K
- Dynamic Workflow Mode7.1K
- Kubernetes Patterns7K
- Intent Driven Development6.9K
- Inherit Legacy Style6.9K
- Codehealth Mcp6.9K
- Orch Build Mvp6.9K
- Orch Pipeline6.9K
- Orch Add Feature6.8K
- Orch Fix Defect6.8K
- Orch Refine Code6.8K
Similar to React Testing
More Testing & QAjest-react-testingmanutej/luxor-claude-marketplace1.2K installsComprehensive Jest and React Testing Library guidance for configuration, mocking, async, and hook tests.
vue-testing-best-practicesvuejs-ai/skills2.1K installsCurated Vue testing guidance covering Vitest, Vue Test Utils, Pinia, async components, and Playwright E2E setup.
frontend-testingaj-geddes/useful-ai-prompts516 installsComprehensive frontend test suites across Jest, Vitest, React Testing Library, and Cypress, with five reference guides.
react-native-testingcallstackincubator/agent-skills102 installsAuthoritative guide for writing React Native component tests with RNTL v13 and v14 version-specific references.