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

Function TestCanCleanNonRunningWithWorktree

internal/tui/picker_test.go:402–420  ·  view source on GitHub ↗

--- Clean Action Tests ---

(t *testing.T)

Source from the content-addressed store, hash-verified

400// --- Clean Action Tests ---
401
402func TestCanCleanNonRunningWithWorktree(t *testing.T) {
403 p := &PRDPicker{
404 basePath: "/project",
405 entries: []PRDEntry{
406 {
407 Name: "auth",
408 Completed: 8,
409 Total: 8,
410 LoopState: loop.LoopStateComplete,
411 Branch: "chief/auth",
412 WorktreeDir: "/project/.chief/worktrees/auth",
413 },
414 },
415 selectedIndex: 0,
416 }
417 if !p.CanClean() {
418 t.Error("expected CanClean() to return true for completed non-running PRD with worktree")
419 }
420}
421
422func TestCanCleanDisabledForRunningPRD(t *testing.T) {
423 p := &PRDPicker{

Callers

nothing calls this directly

Calls 1

CanCleanMethod · 0.95

Tested by

no test coverage detected