Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aj-geddes avatar

Frontend Testing

  • 457 installs
  • 305 repo stars
  • Updated March 4, 2026
  • aj-geddes/useful-ai-prompts

frontend-testing is a useful-ai-prompts skill that guides adding unit, component, and integration tests for UI logic, hooks, and user flows before merge or release.

About

frontend-testing is a prompt skill from aj-geddes/useful-ai-prompts for adding frontend test coverage before merge or release. It structures work on unit tests for utilities, component tests for UI pieces, and integration tests for hooks and user flows so regressions surface in CI instead of production. Developers reach for frontend-testing when a feature branch needs systematic test plans for React or similar UI stacks without writing boilerplate guidance from scratch. The skill encodes testing workflows agents can execute against existing component and hook files.

  • Component and hook unit testing
  • User interaction and accessibility assertions
  • Mocking network and router dependencies
  • Snapshot vs behavior-driven test choices
  • CI-friendly test layout and coverage targets

Frontend Testing by the numbers

  • 457 all-time installs (skills.sh)
  • Ranked #624 of 2,153 Testing & QA skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill frontend-testing

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs457
repo stars305
Last updatedMarch 4, 2026
Repositoryaj-geddes/useful-ai-prompts

How do you add frontend tests for hooks and user flows?

Add unit, component, and integration tests for UI logic, hooks, and user flows before merging or releasing frontend changes.

Who is it for?

Frontend developers preparing a feature branch for merge who need structured unit, component, and integration test coverage.

Skip if: Backend-only changes with no UI surface or teams already running exhaustive E2E suites that cover the same flows end to end.

When should I use this skill?

Frontend changes need unit, component, or integration tests for hooks and user flows before merge or release.

What you get

Unit tests, component tests, and integration tests covering UI logic, hooks, and critical user flows

  • Unit test files
  • Component test suites
  • User-flow integration tests

Files

SKILL.mdMarkdownGitHub ↗

Frontend Testing

Table of Contents

Overview

Build comprehensive test suites for frontend applications including unit tests, integration tests, and end-to-end tests with proper coverage and assertions.

When to Use

  • Component testing
  • Integration testing
  • End-to-end testing
  • Regression prevention
  • Quality assurance
  • Test-driven development

Quick Start

Minimal working example:

// Button.test.tsx
import { render, screen, fireEvent } from '@testing-library/react';
import '@testing-library/jest-dom';
import { Button } from './Button';

describe('Button Component', () => {
  it('renders button with text', () => {
    render(<Button>Click me</Button>);
    expect(screen.getByRole('button')).toHaveTextContent('Click me');
  });

  it('calls onClick handler when clicked', () => {
    const handleClick = jest.fn();
    render(<Button onClick={handleClick}>Click</Button>);

    fireEvent.click(screen.getByRole('button'));
    expect(handleClick).toHaveBeenCalledTimes(1);
  });

  it('disables button when disabled prop is true', () => {
    render(<Button disabled>Click me</Button>);
    expect(screen.getByRole('button')).toBeDisabled();
  });

  it('applies variant styles correctly', () => {
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Jest Unit Testing (React)Jest Unit Testing (React)
React Testing Library Integration TestsReact Testing Library Integration Tests
Vitest for Vue TestingVitest for Vue Testing
Cypress E2E TestingCypress E2E Testing
Test Coverage ConfigurationTest Coverage Configuration

Best Practices

✅ DO

  • Follow established patterns and conventions
  • Write clean, maintainable code
  • Add appropriate documentation
  • Test thoroughly before deploying

❌ DON'T

  • Skip testing or validation
  • Ignore error handling
  • Hard-code configuration values

Related skills

FAQ

What test types does frontend-testing cover?

frontend-testing covers unit tests for UI logic, component tests for interface pieces, and integration tests for hooks and user flows before frontend changes merge or release.

When should developers use frontend-testing?

Use frontend-testing when a frontend feature branch needs systematic test coverage for components, hooks, and user flows and you want agent-guided testing workflows instead of ad hoc test stubs.

Testing & QAfrontendtesting

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.