testing-patterns

Enforce standardized testing patterns for Vitest and Playwright tests.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/madlado87/agentes --skill testing-patterns-madlado87
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/madlado87/agentes/tree/main/.github/skills/testing-patterns
Command: npx skills add https://github.com/madlado87/agentes --skill testing-patterns-madlado87

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Standardized testing patterns to prevent flaky tests and inconsistent practices across Vitest unit tests and Playwright tests, improving reliability and readability.

Core Features & Use Cases

  • Enforces AAA test structure for components, hooks, and utilities.
  • Promotes mock factories and deterministic data generation.
  • Provides templates and guidelines for accessible queries and test organization.

Quick Start

Write tests following the documented conventions and run the test suite to verify correctness.

Frequently Asked Questions about testing-patterns

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

FAQPage Schema
How do I stop my Vitest unit tests from being flaky?

To prevent flaky Vitest unit tests, enforce deterministic mock factories from feature mocks, prohibit hard-coded test data, and maintain isolated tests with fresh setup for reliable execution.

What is the best way to structure Playwright E2E tests?

The best way to structure Playwright E2E tests is using the AAA test structure, enforcing accessible queries via strict Testing Library usage, and standardizing end-to-end flows for readability.

How do I create deterministic mock factories for frontend testing?

Create deterministic mock factories by deriving mocks directly from feature mocks and prohibiting hard-coded test data, ensuring that component tests, hooks, and utilities yield consistent results.

Does Vitest work with Testing Library for accessible queries?

Vitest works with Testing Library by enforcing strict accessible queries in component tests, ensuring that frontend testing patterns prioritize accessibility and standardize test organization.

Why should I use standardized testing patterns for component tests?

Standardized testing patterns for component tests prevent inconsistent practices across your frontend apps, improving the reliability, readability, and maintainability of your Vitest and Playwright test suites.

Can I use Playwright for end-to-end flows in modern frontend apps?

Playwright can be used to enforce standardized testing patterns for end-to-end flows in modern frontend apps, integrating seamlessly with Vitest unit tests for comprehensive component and E2E coverage.