Files
vitareba/lib/utils
g-butandClaude Sonnet 4.6 a579c237e3 test(domain): add tests for normalizeCheckinMetric, streakMessage, relativeDate, sparkLevel
Cover the four functions extracted from components in the prior commit:
- normalizeCheckinMetric: boundary values (1→0, 5→100), midpoint, fractional rounding
- streakMessage: each milestone tier (0/1, 2, 3-6, 7-13, 14-29, 30+)
- relativeDate: today, yesterday, N-days-ago cases
- sparkLevel: low / mid / high threshold boundaries per SPARKLINE config

Test count: 133 → 153 (+20)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 09:31:38 +02:00
..