Skip to content

test(program-builder): session-detail-utils coverage - #110

Merged
rghamilton3 merged 4 commits into
mainfrom
worktree-chore+tests
Apr 15, 2026
Merged

rghamilton3 merged 4 commits into
mainfrom
worktree-chore+tests

Conversation

@rghamilton3

Copy link
Copy Markdown
Contributor

Summary

  • Adds 57 unit tests for src/components/program-builder/session-detail-utils.ts -- all 5 exported pure functions previously had zero test coverage per static analysis
  • Adds quick-plan artifact documenting scope decisions

Functions covered

Function Tests
formatSeconds 5 -- boundary at 59s/60s, zero, exact minutes, padded seconds
formatLoadSpec 12 -- all 7 load types + missing-field fallbacks
formatSetsReps 16 -- all 12 SetScheme variants, AMRAP suffix, range formatting
formatLoad 14 -- percentageSets with/without 1RM, floor-to-5 rounding, all scheme types
buildGroupedActivities 5 -- sort order, empty cases, scheme reference preservation

Deferred (documented in quick plan)

  • useSessionTemplatesFull -- hook requiring renderHook + adapter mocking, tracked in quick plan
  • E2E display broadcast round-trip -- fully spec'd in Context/Backlog/e2e-display-broadcast-roundtrip.md

Test plan

  • bun run test -- 2525/2525 pass
  • bun run build -- clean (no TS errors)

@vercel

vercel Bot commented Apr 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ardent-forge Ready Ready Preview, Comment Apr 15, 2026 2:31pm

rghamilton3 added a commit that referenced this pull request Apr 15, 2026
Covers 4 gaps identified in PR #110 review (P16-001 through P16-004):
- formatLoad: emom and descendingReps without-load paths (P16-001)
- buildGroupedActivities: orphan activity drop-silently contract (P16-002)
- formatSetsReps: mixed number/range fixedSets combinations (P16-003)
- formatSetsReps + formatLoad: unrecognized scheme type fallthrough (P16-004)

Test count: 57 → 64
Review: Context/Reviews/0016-pr110-session-detail-utils-tests-2026-04-15.md
rghamilton3 added a commit that referenced this pull request Apr 15, 2026
All 4 [TASK] findings implemented directly in test file.
Status: Resolved
57 tests across formatSetsReps, formatLoad, formatLoadSpec, formatSeconds,
and buildGroupedActivities -- all previously unreached per static analysis.
Includes quick-plan artifact documenting scope decisions and deferred items
(E2E display broadcast round-trip, useSessionTemplatesFull hook).
Covers 4 gaps identified in PR #110 review (P16-001 through P16-004):
- formatLoad: emom and descendingReps without-load paths (P16-001)
- buildGroupedActivities: orphan activity drop-silently contract (P16-002)
- formatSetsReps: mixed number/range fixedSets combinations (P16-003)
- formatSetsReps + formatLoad: unrecognized scheme type fallthrough (P16-004)

Test count: 57 → 64
Review: Context/Reviews/0016-pr110-session-detail-utils-tests-2026-04-15.md
All 4 [TASK] findings implemented directly in test file.
Status: Resolved
@rghamilton3
rghamilton3 force-pushed the worktree-chore+tests branch from 882cfff to f1c0f6b Compare April 15, 2026 14:30
@rghamilton3
rghamilton3 merged commit e0ff637 into main Apr 15, 2026
3 of 4 checks passed
@rghamilton3
rghamilton3 deleted the worktree-chore+tests branch April 15, 2026 14:31

This branch was successfully deployed

1 active deployment
Preview — f1c0f6b6 Deployed Apr 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant