kb-testing-patterns

Official

Write reliable tests with confidence.

AuthorTimeKast
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents flaky, shallow, and inconsistent test suites by giving a repo-specific, universal set of testing principles across the unit, component, and E2E layers.

Core Features & Use Cases

  • 3-layer testing pyramid guidance: Defines what belongs in Unit vs Component (RTL) vs E2E (Playwright) and why this repo uses a 3-layer structure.
  • AAA and FIRST test structure: Standardizes how to arrange, act, and assert and how to keep tests fast, isolated, repeatable, self-checking, and timely.
  • RTL interaction and querying rules: Recommends role-first queries, uses userEvent over fireEvent, and avoids shallow/empty assertions.
  • Mocking and server-action test strategy: Clarifies when to mock external services and how to test server actions at the Unit tier using Drizzle factory-function mocks.
  • Test data patterns and anti-patterns: Covers fixtures/factories/builders, minimal realistic data, and common mistakes to avoid.

Quick Start

Use kb-testing-patterns when you are writing or reviewing tests to ensure your Unit, RTL component, and Playwright E2E coverage follows consistent structure, interaction, and mocking rules.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: kb-testing-patterns
Download link: https://github.com/TimeKast/AgendaInteligente/archive/main.zip#kb-testing-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.