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

Function TestOrphanedWorktreeNotTracked

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

Source from the content-addressed store, hash-verified

827}
828
829func TestOrphanedWorktreeNotTracked(t *testing.T) {
830 // An orphaned entry with no PRD loaded should still be cleanable
831 p := &PRDPicker{
832 basePath: "/project",
833 entries: []PRDEntry{
834 {
835 Name: "stale",
836 WorktreeDir: "/project/.chief/worktrees/stale",
837 Orphaned: true,
838 LoopState: loop.LoopStateReady,
839 LoadError: fmt.Errorf("orphaned worktree (no prd.json)"),
840 },
841 },
842 selectedIndex: 0,
843 }
844 if !p.CanClean() {
845 t.Error("expected CanClean() to return true for orphaned worktree without PRD")
846 }
847}
848
849// --- Empty Directory Filtering Tests ---
850

Callers

nothing calls this directly

Calls 1

CanCleanMethod · 0.95

Tested by

no test coverage detected