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

Function TestCanCleanOrphanedWorktree

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

Source from the content-addressed store, hash-verified

809}
810
811func TestCanCleanOrphanedWorktree(t *testing.T) {
812 p := &PRDPicker{
813 basePath: "/project",
814 entries: []PRDEntry{
815 {
816 Name: "auth",
817 WorktreeDir: "/project/.chief/worktrees/auth",
818 Orphaned: true,
819 LoopState: loop.LoopStateReady,
820 },
821 },
822 selectedIndex: 0,
823 }
824 if !p.CanClean() {
825 t.Error("expected CanClean() to return true for orphaned worktree")
826 }
827}
828
829func TestOrphanedWorktreeNotTracked(t *testing.T) {
830 // An orphaned entry with no PRD loaded should still be cleanable

Callers

nothing calls this directly

Calls 1

CanCleanMethod · 0.95

Tested by

no test coverage detected