You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SPA tests: pure utils — tokenStore, dates.todayIso, ageWeeks #109
Follow-up to #105 / PR #106 — small pure helpers, easy wins.
Cover
auth/tokenStore.ts — save→load round-trip; clearTokens empties the slot; loadTokens on corrupt JSON calls removeItem and returns null; missing key → null.
lib/dates.ts todayIso() — returns farm-local YYYY-MM-DD (not UTC); pin with fake timers around an evening-UTC-rollover instant to prove it does not roll to the next day. Zero-pads month/day.
routes/FlocksPage.tsx ageWeeks (Math.max(0, Math.floor(days/7))) — extract to a testable util and cover 0/6/7/13 days + negative (pre-placement) → 0.
Activity
F28 follow-up: pure-util tests — tokenStore, dates.todayIso, ageWeeks (…