Test pure functions with input/output assertions. Never unit test hooks, components, or side effects.
| Testing hooks | renderHook(), QueryClientProvider in test | Extract logic to pure function | | Mocking time | vi.useFakeTimers(), mockDate | Inject timestamp as parameter | | Mocking internals | vi.mock('../api/firebase') | Test pure logic, not integration | | Testing UI | render(), screen.getByText() | Only E2E tests for UI |
Use when writing tests, adding coverage, implementing business logic, or building features with TDD. Enforces output-based testing of pure functions only - never test imperative shell directly. Source: bumgeunsong/daily-writing-friends.
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/bumgeunsong/daily-writing-friends --skill testing Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw