Files
claude-code/src/utils/__tests__
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-04-02 14:44:56 +08:00
2026-04-02 16:03:20 +08:00
2026-04-02 14:44:56 +08:00
2026-04-02 16:03:20 +08:00
2026-04-02 14:44:56 +08:00
2026-04-02 14:44:56 +08:00
2026-04-02 14:44:56 +08:00
2026-04-02 16:03:20 +08:00
2026-04-02 16:03:20 +08:00
2026-04-02 16:03:20 +08:00
2026-04-02 14:44:56 +08:00
2026-04-02 16:03:20 +08:00
2026-04-02 20:28:08 +08:00