test-guidelines

Standardize Vitest and React Testing Library tests with the AAA pattern.

Updated Dec 29, 2025
One-click install
npx skills add https://github.com/asakuno/template-repository --skill test-guidelines-asakuno
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-guidelines
Source: https://github.com/asakuno/template-repository/tree/main/.claude/skills/test-guidelines
Command: npx skills add https://github.com/asakuno/template-repository --skill test-guidelines-asakuno

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a standardized, readable testing guideline for Vitest and React Testing Library, ensuring consistent quality across tests and smoother collaboration.

Core Features & Use Cases

  • Establishes concrete quality standards for test structure, naming, and coverage.
  • Enforces the AAA (Arrange-Act-Assert) pattern and focuses on user-visible behavior.
  • References are included for test patterns and AAA guidance to handle edge cases, forms, and async tests.

Quick Start

Begin by applying the AAA pattern with explicit actual and expected variables when writing tests, and consult the references/ files for detailed patterns.

Frequently Asked Questions about test-guidelines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Vitest and React Testing Library tests for better maintainability?

To structure Vitest and React Testing Library tests for maintainability, apply the Arrange-Act-Assert pattern with explicit actual and expected variables, maintaining a flat test structure focused on user-visible behavior.

What is the AAA pattern in unit testing and how does it enforce test quality?

The AAA pattern in unit testing enforces quality by separating tests into Arrange, Act, and Assert phases. This standardization uses explicit variables to improve readability and consistency across frontend development teams.

How do I ensure consistent naming conventions and branch coverage in Vitest?

To ensure consistent naming conventions and branch coverage in Vitest, establish concrete quality standards that enforce descriptive test names and measure branch coverage, standardizing test structure across your team.

Can I use this testing guideline for handling async tests and forms in React?

Yes, you can use this testing guideline for handling async tests and forms in React. It includes reference files that provide specific test patterns and AAA guidance to manage edge cases effectively.

Do I need explicit imports from testing libraries when writing component tests?

Yes, you need explicit imports from testing libraries when writing component tests. The guideline enforces explicit imports to maintain clear dependencies and ensure consistent quality across your test suite.