React Testing
React component testing patterns: React Testing Library, Vitest/Jest, MSW network mocking, axe accessibility, and the RTL vs E2E decision boundary.
- What
- React component testing patterns: React Testing Library, Vitest/Jest, MSW network mocking, axe accessibility, and the RTL vs E2E decision boundary.
- Cost
- Free
- Needs
- a React codebase with a test runner (Vitest or Jest). Pure guidance skill, nothing to install.
- Level
- Beginner — a React codebase with a test runner (Vitest or…
- Install
- Copy the installer prompt below into your Muse — your agent does the rest.
Curated by Skill Harbor: a testing skill for writing React component tests that check behavior, not implementation details. It covers the core principle (test what the user sees and does), component tests with React Testing Library, custom hook tests, accessibility assertions with axe, network-level mocking with MSW, and the decision boundary between RTL component tests, Playwright component testing, and full Cypress/Playwright end-to-end runs. It also guides migration from Enzyme and class-component-era patterns, and setting up Vitest or Jest for a new React project. By @affaan-m, listed here with credit to its creator. From the affaan-m/ECC repository (MIT). Honest caveats: pure guidance, nothing to install; assumes a React project with a test runner; examples follow modern RTL idioms, legacy Enzyme suites need translation. Skill Harbor never reviews the code, review it yourself before use.
Version:
Quick answer
a testing skill for writing React component tests that check behavior, not implementation details. It covers the core principle (test what the user sees and does), component tests with React Testing Library, custom hook tests, accessibility assertions with axe, network-level mocking with MSW, and the decision boundary between RTL component tests, Playwright component testing, and full Cypress/Playwright end-to-end runs.
Install
Copy the install package below, then paste it into Muse🧪 Install ran in our test sandbox · Nov 11, 2026📌 Pinned version: commit 4eb71d9Pinned version: install the code at commit 4eb71d92a39cab44ad40ac9d8a6a5ccb4029d6c2 exactly (Skill Harbor tested this version). Do not substitute a newer version. If this commit is unreachable, stop and tell me. Use "React Testing" with your Muse. Prerequisites: a React codebase with a test runner (Vitest or Jest). Pure guidance skill, nothing to install. 1. Open the skill: https://raw.githubusercontent.com/affaan-m/ECC/4eb71d92a39cab44ad40ac9d8a6a5ccb4029d6c2/skills/react-testing/SKILL.md and copy the full SKILL.md text. 2. Paste it into a chat with Muse and add: "Write behavior-focused tests for this component following these patterns: user-visible behavior, MSW for network, axe for accessibility." 3. For test strategy questions, ask: "Should this be an RTL component test or a full E2E run? Apply the decision boundary." Tip: paste one component (plus its current test file, if any) at a time. Safety: a skill is plain-text instructions; it runs nothing by itself. Review generated tests before trusting them, especially assertions around async behavior.
Saved to your recent installs. Find it anytime on /connect.
🔒 Security, provenance and what this touches
The install prompt below already includes the vetting steps: your agent follows the community checklist before installing anything with executable code. Want more?
Verification certificate
Dated facts about what was checked for this listing, and how. This is not a safety certification.
- Pinned version
- 4eb71d9 · 2026-10-13
- Sandbox install test
- Install ran in our test sandbox · Nov 11, 2026
- Creator identity
- Not verified
- Fingerprint watch
- Last checked · Nov 21, 2026 : no change detected in the files linked by this install prompt
- Install prompt analysis
- 2026-10-13 : No commands, network calls, packages, file writes or API keys detected.
Skill Harbor never reviews the code of a listed skill. These are dated facts about the install prompt and our install test, not a safety certification. Review a skill yourself before you install it. How we verify
Questions
How do I install a skill?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the skill up for you — no manual configuration.
Where does my money go?
Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.
What does the ✓ next to a creator’s name mean?
It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a skill before installing it.