.agents/skills/tests-components/SKILL.md
Guides how to design, implement, and validate high-value renderer component tests using Vitest and Testing Library from user-visible behavior, interaction contracts, and render-lifecycle integration boundaries.
npx skillsauth add esplotter/esplotter tests-componentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run with: npm run test:components
This skill defines how to validate renderer UI behavior from the user perspective using Testing Library. It standardizes where specs live, what behaviors must be covered, how to model interactions, and how to report outcomes so component reviews remain fast and objective.
Canonical policy source: docs/testing/tests.md.
Local layout/context source: docs/testing/tests.md.
renderHook(...)).tests-unit-renderer.tests-unit-preload.tests-unit-main or tests-unit-main-infrastructure.tests-e2e.getByRole/findByRole -> getByLabelText -> getByText.data-testid only when no accessible selector is reliable.userEvent for meaningful interactions instead of directly calling handlers.findBy*/waitFor and assert final user-visible state.should ... format.environment: 'jsdom').src/test/renderer/<feature>/components/<ComponentGroup>/<Component>.spec.tsxsrc/test/renderer/<feature>/hooks/<Hook>.spec.tstests-unit-renderer.should ... convention.src/test/renderer/.npm run test:components passes.npm run test:componentsReturn a structured YAML report including:
status: ok | needs_clarification | errorsummary: what was tested/changed in one paragraphfiles_changed: list of changed pathstests_added_or_updated: list of test files added/updatedmocks_added_or_updated: list of mock files added/updatedcommands_run: commands executed (at minimum npm run test:components when applicable)result:
passed: booleanfailed_tests: listerror_excerpt: short excerpt when failingquestions: open questions with reason when clarification is needednext_actions: recommended follow-up actionswarnings: risks, assumptions, or deviationsdevops
Applies consistent renderer UI/UX implementation patterns using a Vercel-inspired white theme, strong accessibility defaults, and repository component conventions.
development
Use this first for any task that changes behavior or tests. This is a test strategy and routing skill, it selects the right test-suite skill(s), defines when to escalate coverage (for example e2e/compiled parity), and enforces regression rules.
tools
Guides how to design, implement, and validate high-value unit tests for renderer pure logic (stores, selectors, mappers, and utility flows) with strict no-DOM boundaries and deterministic contract assertions.
testing
Guides how to design, implement, and validate high-value unit tests for preload bridge contracts, renderer-facing exposures, and IPC delegation behavior with clear boundaries and deterministic collaborator doubles.