writing-tests

Originally fromthird774/dotfiles
Installation
SKILL.md

Writing Tests

Core principle: Test user-observable behavior with real dependencies. Tests should survive refactoring.

"The more your tests resemble the way your software is used, the more confidence they can give you." — Kent C. Dodds

Why this matters: Tests exist to give you confidence. The Testing Trophy prioritizes integration tests because they test real behavior across real modules — giving maximum confidence per test written. Unit tests in isolation often just test mocks, not your actual system.

Testing Trophy Model

Priority Type When
1st Integration Default - multiple units with real dependencies
2nd E2E Complete user workflows
3rd Unit Pure functions only (no dependencies)

Mocking Guidelines

Default: Don't mock. Use real dependencies.

Related skills
Installs
11
GitHub Stars
118
First Seen
Feb 12, 2026