Files
claude-code/src
JiayuWang(王嘉宇) 465e9f01c6 test: add coverage for formatRelativeTimeAgo and formatLogMetadata (#94)
These two exported functions in src/utils/format.ts had no test
coverage. formatRelativeTimeAgo wraps formatRelativeTime and forces
numeric:'always' for past dates; formatLogMetadata assembles parts
(time, branch, size/count, tag, agentSetting, prNumber) into a
' · '-separated string.

Added 8 tests for formatRelativeTimeAgo covering past dates, future
dates, equal-to-now, and the no-'ago'-for-future invariant. Added
9 tests for formatLogMetadata covering all optional fields and the
separator format.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 22:17:58 +08:00
..
2026-03-31 23:32:58 +08:00
2026-03-31 23:03:47 +08:00
2026-04-03 17:21:09 +08:00
2026-03-31 20:40:16 +08:00
2026-03-31 23:03:47 +08:00
2026-03-31 23:03:47 +08:00
2026-03-31 20:40:16 +08:00
2026-04-03 20:11:09 +08:00
2026-03-31 23:32:58 +08:00
…
2026-04-02 21:41:19 +08:00
…
2026-04-02 17:01:39 +08:00
…
…
…
2026-03-31 23:03:47 +08:00