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

Function TestRenderEntryWithLoadError

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

Source from the content-addressed store, hash-verified

179}
180
181func TestRenderEntryWithLoadError(t *testing.T) {
182 p := &PRDPicker{
183 basePath: "/project",
184 entries: []PRDEntry{
185 {
186 Name: "broken",
187 LoadError: fmt.Errorf("parse error"),
188 Branch: "chief/broken",
189 WorktreeDir: "/project/.chief/worktrees/broken",
190 },
191 },
192 }
193
194 result := p.renderEntry(p.entries[0], false, 80)
195 // With load error, should show [error] but not branch/worktree info
196 if !containsText(result, "error") {
197 t.Errorf("expected [error] in output, got: %s", result)
198 }
199}
200
201func TestCanMergeCompletedWithBranch(t *testing.T) {
202 p := &PRDPicker{

Callers

nothing calls this directly

Calls 2

renderEntryMethod · 0.95
containsTextFunction · 0.85

Tested by

no test coverage detected