testing
Output-Based Testing for Pure Functions
Test pure functions with input/output assertions. Never unit test hooks, components, or side effects.
When to Use
- User asks to "write tests" or "add coverage"
- New business logic is being implemented
- TDD requested for new feature
- Coverage report shows untested utils/
Core Pattern
TESTABLE (Functional Core) │ NOT UNIT TESTED (Imperative Shell)
───────────────────────────────│────────────────────────────────────
Pure functions in utils/ │ React hooks (useX)
Calculations, transformations │ Components (*.tsx)
Validators, formatters │ API calls, Firebase operations
More from bumgeunsong/daily-writing-friends
firebase-functions
Use when creating or modifying Firebase Cloud Functions in /functions directory. Enforces function structure and error handling patterns.
45pr-stacking
PR stacking workflow for breaking large features into smaller, dependent PRs. Use when planning multi-step features, creating dependent branches, or rebasing stacked changes.
29commit
Use when creating git commits in this project
28refactoring
Use when user explicitly asks to refactor code, or when test coverage is requested for untested code with side effects. Enforces Functional Core Imperative Shell pattern extraction before any changes.
28api-layer
Use when creating or modifying API functions in */api/ directories. Enforces Firestore patterns and data fetching conventions.
28code-style
Use when writing or modifying any code. Enforces naming conventions, function design, and code clarity principles.
28