Product framing
Impact: S · Effort: S · Tier: 1 · Good first issue
Two pure presentation helpers have uncovered branches that are easy to reach by calling the function directly with a bytes.Buffer:
printWorktreeResult (cmd/add.go:186) — the Copied/Skipped/SkippedSymlinks branches at L191-198 are untested (function sits at 75% branch coverage).
printSyncDryRun (cmd/sync.go:270) — the merge-verb branch at L272-273 is untested (83.3%).
Neither function has side effects beyond writing to an io.Writer, making them ideal unit-test targets.
Type
Files to change
cmd/add_test.go (or a new cmd/add_print_test.go)
cmd/sync_test.go
Description
Current state:
cmd/add.go:191-198 — Copied/Skipped/SkippedSymlinks output paths in printWorktreeResult have no direct test.
cmd/sync.go:272-273 — the merge-verb branch in printSyncDryRun has no direct test.
Desired state: Unit tests call each function with a bytes.Buffer as the writer and assert the rendered output for each uncovered branch.
Acceptance
Product framing
Impact: S · Effort: S · Tier: 1 · Good first issue
Two pure presentation helpers have uncovered branches that are easy to reach by calling the function directly with a
bytes.Buffer:printWorktreeResult(cmd/add.go:186) — the Copied/Skipped/SkippedSymlinks branches at L191-198 are untested (function sits at 75% branch coverage).printSyncDryRun(cmd/sync.go:270) — the merge-verb branch at L272-273 is untested (83.3%).Neither function has side effects beyond writing to an
io.Writer, making them ideal unit-test targets.Type
Files to change
cmd/add_test.go(or a newcmd/add_print_test.go)cmd/sync_test.goDescription
Current state:
cmd/add.go:191-198— Copied/Skipped/SkippedSymlinks output paths inprintWorktreeResulthave no direct test.cmd/sync.go:272-273— the merge-verb branch inprintSyncDryRunhas no direct test.Desired state: Unit tests call each function with a
bytes.Bufferas the writer and assert the rendered output for each uncovered branch.Acceptance
printWorktreeResulttested for Copied, Skipped, and SkippedSymlinks result types.printSyncDryRuntested for the merge-verb branch.bytes.Buffer— no subprocess / CLI invocation needed.