Summary
The useRelativeTime hook has no unit tests. Tests should confirm the hook returns the correct relative string at several time distances and that the output updates after the 60-second refresh interval.
Scope
- Test a timestamp 30 seconds ago returns a string containing
seconds
- Test a timestamp 90 seconds ago returns a string containing
minute
- Test a timestamp 2 hours ago returns a string containing
hours
- Test a timestamp 3 days ago returns a string containing
days
- Advance fake timers by 60 seconds and assert the output string updates
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
The
useRelativeTimehook has no unit tests. Tests should confirm the hook returns the correct relative string at several time distances and that the output updates after the 60-second refresh interval.Scope
secondsminutehoursdaysAcceptance Criteria
ETA: 12 hours
Coordinate on Telegram