tdd
SkillDev toolsGuide test-driven development using red-green-refactor. Use when building a new hook, fixing a bug test-first, or following TDD workflow in this React hooks library.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the tdd skill
What this skill tells your AI
The instructions your AI receives, as published by helderberto/use-is-mounted-ref in .claude/skills/tdd/SKILL.md and read by ahel’s review.
This is a React hooks library — all behavior is testable via renderHook.
Cycle
Red
Write a failing test in src/__tests__/<hook-name>.test.ts:
- Cover: hook is defined, mounted state, unmounted state, any side effects
- Use
renderHookfrom@testing-library/react - Run
npm testand confirm it fails for the right reason
Green
Implement the minimum hook code in src/<hook-name>.ts to pass:
- Run
npm testand confirm all tests pass
Refactor
Clean up without breaking tests:
- Run
npm run lintandnpm run test:tscto verify
Reference patterns
- Mount/unmount:
src/__tests__/use-is-mounted-ref.test.ts - Side effects/cleanup:
src/__tests__/use-abort-controller.test.ts
Signals
- GitHub stars
- 44
- Forks
- 5
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
tdd-helderberto- Source
- github.com/helderberto/use-is-mounted-ref