← ClaudeAtlas

testing-fundamentalslisted

Auto-invoke when reviewing test files or discussing testing strategy. Enforces testing pyramid, strategic coverage, and stack-appropriate frameworks.
aiskillstore/marketplace · ★ 329 · Testing & QA · score 79
Install: claude install-skill aiskillstore/marketplace
# Testing Fundamentals Review > "If you can't test it, you don't understand it. Tests are proof of understanding." ## When to Apply Activate this skill when: - Reviewing test files (*.test.ts, *.spec.ts, *.test.js) - Junior asks about testing strategy - Completing a feature without tests - Discussing coverage or test quality --- ## The Testing Pyramid ``` ▲ ╱ ╲ E2E (10%) ╱ ╲ Playwright - Full user flows ╱─────╲ ╱ ╲ Integration (20%) ╱ ╲ Vitest + RTL - Component interactions ╱───────────╲ ╱ ╲ Unit (70%) ╱ ╲ Vitest - Functions, utils, logic ───────────────── ``` - **Unit Tests (70%)**: Fast, isolated, test one thing - **Integration Tests (20%)**: Components working together - **E2E Tests (10%)**: Critical user journeys only --- ## Stack-Specific Framework Guide | Stack | Unit/Integration | E2E | |-------|------------------|-----| | Vite + React | **Vitest** + React Testing Library | Playwright | | Create React App | Jest + RTL | Playwright | | Next.js | Vitest or Jest + RTL | Playwright | | Node.js | **Vitest** (native ESM) | - | | Python | pytest | - | | Go | go test | - | **Why Vitest for Vite?** - 10-20x faster than Jest in watch mode - Native ESM support - Same config as Vite (vite.config.ts) - Compatible with Jest API --- ## What to Test (The 3 Questions) 1. **Happy Path**: Does it work when everything goes right? 2. **Edge Cases**: What happens with empty, null, max values?