MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestFormatBranchPathTruncatesBranch

Function TestFormatBranchPathTruncatesBranch

internal/tui/picker_test.go:150–159  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

148}
149
150func TestFormatBranchPathTruncatesBranch(t *testing.T) {
151 p := &PRDPicker{}
152
153 // Very small width — only room for branch (truncated)
154 result := p.formatBranchPath("chief/very-long-branch-name", ".chief/worktrees/auth/", 15)
155 runeCount := utf8.RuneCountInString(result)
156 if runeCount > 15 {
157 t.Errorf("expected result to fit within 15 display chars, got %d: %s", runeCount, result)
158 }
159}
160
161func TestWorktreeDisplayPathWithWorktree(t *testing.T) {
162 p := &PRDPicker{basePath: "/project"}

Callers

nothing calls this directly

Calls 1

formatBranchPathMethod · 0.95

Tested by

no test coverage detected