test-guidelines

Standardize Vitest and React Testing Library test quality with explicit imports and AAA pattern.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Testing standards for Vitest and React Testing Library to ensure reliable, maintainable test suites across projects.

Core Features & Use Cases

  • Enforces explicit imports from vitest and React Testing Library in all test files.
  • Promotes the AAA pattern, clear naming conventions, and single-assert tests for improved readability.
  • Guides test structure, coverage expectations, and avoidance of nesting, ensuring meaningful branch coverage.

Quick Start

Follow these guidelines when writing or updating tests to ensure consistent, reliable Vitest/RTL coverage.

Frequently Asked Questions about test-guidelines

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

FAQPage Schema
What are the best practices for structuring Vitest and React Testing Library tests?

Best practices for Vitest and React Testing Library tests include using explicit imports, following the AAA pattern, adopting clear naming conventions, and writing single-assert tests to improve readability and maintainability across your test suite.

How do I improve branch coverage in React testing without deep nesting?

To improve branch coverage in React testing, avoid deeply nested test structures and focus on meaningful branch coverage by writing clear, single-assert tests that follow the AAA pattern and use semantic assertions to validate component behavior.

Does this testing approach require explicit imports from vitest and RTL?

Yes, this testing approach requires explicit imports from vitest and React Testing Library in all test files to ensure standardized, reliable test execution and maintainable test suites during frontend development and code review.

When should I apply these Vitest and RTL testing guidelines?

Apply these Vitest and RTL testing guidelines during frontend React development and code review when writing or updating unit and integration tests to ensure consistent, reliable coverage and standardized test quality across projects.

Why use semantic assertions in React Testing Library tests?

Semantic assertions in React Testing Library tests ensure you are validating user-visible behavior rather than implementation details, resulting in more robust and maintainable test suites that survive component refactoring without breaking.

Can I use these test guidelines for both unit and integration tests?

Yes, these test guidelines apply to both unit and integration tests in frontend React projects, enforcing explicit imports, the AAA pattern, and semantic assertions to standardize test quality and ensure reliable, maintainable test suites.