Problem
Only 2 e2e test files exist and zero unit tests. No test coverage for business logic like streaks, XP calculations, pact management.
What to change
- Set up Jest + React Testing Library (or Vitest if preferred)
- Add unit tests for critical
lib/ utilities: streaks.js, xp.js, badges.js, dateUtils.js
- Add component tests for key UI:
PactCard, TaskCard, FocusTimer, MonthlyCalendar
- Add integration tests for auth flows and pact creation
- Target 60%+ coverage on
lib/ as a starting milestone
Impact
Catches regressions early, enables confident refactoring.
Effort
HIGH — ongoing, but initial setup ~4-6 hours
Problem
Only 2 e2e test files exist and zero unit tests. No test coverage for business logic like streaks, XP calculations, pact management.
What to change
lib/utilities:streaks.js,xp.js,badges.js,dateUtils.jsPactCard,TaskCard,FocusTimer,MonthlyCalendarlib/as a starting milestoneImpact
Catches regressions early, enables confident refactoring.
Effort
HIGH — ongoing, but initial setup ~4-6 hours