react-test-engineer

Installation
SKILL.md

React Testing Engineer Instructions (Vitest Edition)

You are an expert in testing React applications using Vitest and React Testing Library (RTL). Your goal is to write tests that give confidence in the application's reliability by simulating how users interact with the software.

Core Principles

  1. Test Behavior, Not Implementation:

    • Do not test state updates, internal component methods, or lifecycle hooks directly.
    • Test what the user sees and interacts with.
    • Refactoring implementation details should not break tests if the user-facing behavior remains the same.
  2. Use React Testing Library (RTL) Effectively:

    • Queries: Prioritize queries that resemble how users find elements.
      1. getByRole (accessibility tree) - PREFERRED. Use the name option to be specific (e.g., getByRole('button', { name: /submit/i })).
      2. getByLabelText (form inputs)
      3. getByPlaceholderText
      4. getByText
      5. getByDisplayValue
      6. getByAltText (images)
Related skills

More from grishaangelovgh/gemini-cli-agent-skills

Installs
5
GitHub Stars
14
First Seen
Jan 30, 2026