react-quality-engineering
Design, write, run, and review tests for React, Next.js, or Vite frontends. Use for Vitest/Jest, React Testing Library, MSW, Playwright, E2E, accessibility testing, visual regression, responsive/adversarial UI testing, flaky tests, test data, CI quality gates, or frontend verification plans.
Taimoor Khan · Static checks on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add Taimoorkhan1122/boring-react --skill react-quality-engineeringAbout this skill
name: react-quality-engineering description: Design, write, run, and review tests for React, Next.js, or Vite frontends. Use for Vitest/Jest, React Testing Library, MSW, Playwright, E2E, accessibility testing, visual regression, responsive/adversarial UI testing, flaky tests, test data, CI quality gates, or frontend verification plans. license: MIT compatibility: React projects with Node-based test tooling; Playwright guidance applies when browser automation is configured. metadata: author: Taimoor Khan version: "1.0.0"
React Quality Engineering
Verify user-observable behavior with the cheapest reliable test layer. Do not make implementation details the contract.
Apply react-production-engineering for architecture and react-component-engineering for semantic/accessibility implementation.
Workflow
- Identify the behavior/risk and choose the lowest-cost test layer that can prove it.
- Reuse the repository's test stack and conventions.
- Test success plus meaningful empty/error/pending/permission/race states.
- Use user-facing locators and realistic interactions.
- For browser tests, rely on readiness assertions and isolation—not sleeps.
- Add accessibility and responsive/adversarial coverage for important UI.
- Diagnose flaky tests at the root cause before adding retries.
- Report what was executed, what failed, and what remains unverified.
Test layer selection
- Unit: pure domain/format/validation logic.
- Component: React Testing Library for rendered behavior and interaction.
- Integration: component + MSW for network states and mutations.
- E2E: Playwright for critical user journeys and browser integration.
- Manual: keyboard/screen-reader-critical behavior and subjective visual hierarchy.
Do not duplicate every assertion across every layer.
Non-negotiable rules
- Test behavior, not private functions, internal state, component tree shape, or arbitrary CSS selectors.
- Prefer role + accessible name, then label/text; use test IDs only when a user-facing locator is unsuitable.
- Do not fix Playwright timing with arbitrary
waitForTimeoutsleeps. - Do not use
networkidleas a universal readiness signal. - Keep E2E tests independently runnable and data-isolated.
- Prefer MSW over mocking
fetch/Axios internals for frontend network behavior. - Automated accessibility checks do not prove WCAG conformance; important flows need keyboard/manual verification.
- Never update visual snapshots blindly to make CI green.
- Retries are a safety net after diagnosis, not a root-cause fix.
When to load references
- Test pyramid/coverage choice: references/testing-strategy.md
- React Testing Library: references/testing-library.md
- MSW/network states: references/msw.md
- Playwright/E2E: references/playwright.md
- Accessibility testing: references/accessibility-testing.md
- Visual/responsive testing: references/visual-regression.md
- Flakiness diagnosis: references/flaky-tests.md
- CI/release gates: references/ci-quality-gates.md
Completion contract
If tests cannot be run, provide the exact intended verification and mark it not run. Never imply green CI from code inspection alone.