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

Function TestRunListSkipsInvalidPRDs

internal/cmd/status_test.go:138–164  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

136}
137
138func TestRunListSkipsInvalidPRDs(t *testing.T) {
139 tmpDir := t.TempDir()
140
141 // Create a valid PRD
142 validDir := filepath.Join(tmpDir, ".chief", "prds", "valid")
143 if err := os.MkdirAll(validDir, 0755); err != nil {
144 t.Fatalf("Failed to create directory: %v", err)
145 }
146 if err := os.WriteFile(filepath.Join(validDir, "prd.md"), []byte("# Valid\n"), 0644); err != nil {
147 t.Fatalf("Failed to create prd.md: %v", err)
148 }
149
150 // Create an invalid PRD directory (no prd.md)
151 invalidDir := filepath.Join(tmpDir, ".chief", "prds", "invalid")
152 if err := os.MkdirAll(invalidDir, 0755); err != nil {
153 t.Fatalf("Failed to create directory: %v", err)
154 }
155
156 opts := ListOptions{
157 BaseDir: tmpDir,
158 }
159
160 err := RunList(opts)
161 if err != nil {
162 t.Errorf("RunList() returned error: %v", err)
163 }
164}
165
166func TestRunStatusAllComplete(t *testing.T) {
167 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 1

RunListFunction · 0.85

Tested by

no test coverage detected