Problem
relativeTime("garbage") renders "NaNm ago" (Math.max(1, NaN) is NaN).
Where
app/index.tsx (relativeTime, no validity check on the parsed date).
Acceptance
Add a failing test first with an invalid createdAt, expecting a fallback like "recently" instead of a string containing "NaN". Then fix.
Note: this repo has no test runner configured yet. Setting up a minimal vitest (or equivalent) config is part of this issue.
Problem
relativeTime("garbage")renders"NaNm ago"(Math.max(1, NaN)isNaN).Where
app/index.tsx(relativeTime, no validity check on the parsed date).Acceptance
Add a failing test first with an invalid
createdAt, expecting a fallback like"recently"instead of a string containing"NaN". Then fix.Note: this repo has no test runner configured yet. Setting up a minimal vitest (or equivalent) config is part of this issue.