congiuluc/my-awesome-copilot/testing-frontend

Claude Code and agent skill by congiuluc/my-awesome-copilot

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Write frontend tests using Vitest and React Testing Library. Use when: testing React components, hooks, user interactions, form submissions, accessibility assertions, or mocking API services.

Install

npx vskill@latest install congiuluc/my-awesome-copilot/testing-frontend

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as congiuluc/my-awesome-copilot/testing-frontend.

Frontend Testing (React)

When to Use

  • Testing React components (rendering, interaction, accessibility)
  • Testing custom hooks
  • Mocking API calls or services
  • Writing integration tests for pages/features
  • Verifying form validation and submission

Official Documentation

Core Rule

Every feature must have corresponding tests before it is considered complete.

Procedure

  1. Follow React testing reference for patterns and conventions
  2. Review component test sample
  3. Query elements by accessible role/label — never by CSS class or test ID
  4. Use userEvent (not fireEvent) for user interactions
  5. Test: rendering, interaction, accessibility, edge cases, error states
  6. Mock API services with MSW or vi.fn()
  7. Verify tests are deterministic — no real network calls
  8. Run npm test locally before committing

Test Structure

tests/
web-app.tests/
components/ # Shared component tests
features/ # Feature-specific tests
hooks/ # Custom hook tests
setup.ts # Test configuration

Naming Convention

  • Test file: {ComponentName}.test.tsx
  • Test suite: describe('{ComponentName}', () => { ... })
  • Test case: it('should {expected behavior}', ...)

Key Patterns

  • Query by role: screen.getByRole('button', { name: 'Submit' })
  • Query by label: screen.getByLabelText('Email')
  • Assert accessibility: toBeVisible(), toHaveAccessibleName()
  • Keyboard: userEvent.tab(), userEvent.keyboard('{Enter}')

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/congiuluc/my-awesome-copilot/testing-frontend/badge)](https://verified-skill.com/skills/congiuluc/my-awesome-copilot/testing-frontend)

Something wrong with this skill or its page? Tell us.