testing-patterns

Provide framework-agnostic test patterns and anti-pattern detection for full-stack projects.

1|1|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/gaoqiongxie/skills-ai --skill testing-patterns-gaoqiongxie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/gaoqiongxie/skills-ai/tree/main/testing-patterns
Command: npx skills add https://github.com/gaoqiongxie/skills-ai --skill testing-patterns-gaoqiongxie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common pain points of inconsistent test quality, lack of clear testing strategy, and widespread test anti-patterns that lead to fragile, hard-to-maintain test suites and wasted development effort for full-stack applications.

Core Features & Use Cases

  • Test Pyramid Guidance: Provides a clear 70/20/10 split for unit, integration, and E2E tests to optimize test suite speed and coverage.
  • Framework-Agnostic Patterns: Offers compatible patterns for Jest, Vitest, React Testing Library, Cypress, and Playwright across common testing scenarios.
  • Anti-Pattern Detection: Identifies and fixes common test bad smells like over-mocking, testing implementation details instead of behavior, and fragile snapshot tests.
  • Use Case: A full-stack developer building a React + Node.js application can use this Skill to design a balanced testing strategy, write reliable unit tests for business logic, and mock external API calls correctly without losing test value.

Quick Start

Request the testing-patterns skill to generate a unit test for your price calculation function that covers boundary values and follows industry best practices.

Frequently Asked Questions about testing-patterns

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

FAQPage Schema
What is the best way to structure a full-stack testing strategy for React and Node.js?

A reliable full-stack testing strategy follows the testing pyramid model with a 70/20/10 split across unit, integration, and E2E tests. This balances test suite speed and coverage while ensuring maintainability for React and Node.js applications.

How do I write reliable unit tests for business logic without testing implementation details?

To write reliable unit tests, focus on testing behavior over implementation details and use test data factory templates. Framework-agnostic patterns help cover boundary values and ensure tests remain maintainable without relying on fragile implementation specifics.

When should I use integration testing versus E2E testing for web applications?

Use integration testing for APIs and service layers, and E2E testing for complete user journeys across web applications. Following the testing pyramid, integration tests validate component interactions, while E2E tests verify critical paths end-to-end.

Why does over-mocking make my test suite fragile and how do I fix it?

Over-mocking creates fragile tests by coupling them to internal implementation rather than external behavior. You can fix this by applying a mock strategy decision tree to determine when external API calls require mocking, ensuring tests retain their value.

Can I use these test best practices with Vitest and Playwright?

Yes, these test best practices are framework-agnostic and offer compatible patterns for Jest, Vitest, React Testing Library, Cypress, and Playwright. This allows you to standardize testing strategy across different tools within the same project.

How do I fix fragile snapshot tests in my React testing workflow?

Fragile snapshot tests are identified as a common anti-pattern that breaks easily upon minor UI changes. You can fix them by applying anti-pattern detection rules to replace broad snapshots with behavior-focused assertions using React Testing Library patterns.