refactor(homeview): extract formatDesc into testable method #165

Closed
opened 2026-07-07 05:22:02 +00:00 by the.auditor · 0 comments
Owner

formatDesc is a closure inside HomeView.renderActivities(), which makes it impossible to unit test the activity description formatting logic. This was highlighted by PR #164 which added issue event formatting — no tests could be written for the new logic.

Suggestion: extract formatDesc into a standalone method on HomeView (or a package-level function) so the formatting logic can be tested with table-driven tests.

Ref: PR #164

`formatDesc` is a closure inside `HomeView.renderActivities()`, which makes it impossible to unit test the activity description formatting logic. This was highlighted by PR #164 which added issue event formatting — no tests could be written for the new logic. Suggestion: extract `formatDesc` into a standalone method on `HomeView` (or a package-level function) so the formatting logic can be tested with table-driven tests. Ref: PR #164
fuzzy closed this issue 2026-07-07 06:17:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/steeper#165
No description provided.