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

Function TestRunStatusWithValidPRD

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

Source from the content-addressed store, hash-verified

7)
8
9func TestRunStatusWithValidPRD(t *testing.T) {
10 tmpDir := t.TempDir()
11
12 prdDir := filepath.Join(tmpDir, ".chief", "prds", "test")
13 if err := os.MkdirAll(prdDir, 0755); err != nil {
14 t.Fatalf("Failed to create directory: %v", err)
15 }
16
17 prdMd := `# Test Project
18
19Test description
20
21### US-001: Story 1
22**Status:** done
23- [x] Done
24
25### US-002: Story 2
26- [ ] Pending
27
28### US-003: Story 3
29**Status:** in-progress
30- [ ] Working
31`
32 prdPath := filepath.Join(prdDir, "prd.md")
33 if err := os.WriteFile(prdPath, []byte(prdMd), 0644); err != nil {
34 t.Fatalf("Failed to create prd.md: %v", err)
35 }
36
37 opts := StatusOptions{
38 Name: "test",
39 BaseDir: tmpDir,
40 }
41
42 err := RunStatus(opts)
43 if err != nil {
44 t.Errorf("RunStatus() returned error: %v", err)
45 }
46}
47
48func TestRunStatusWithDefaultName(t *testing.T) {
49 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 1

RunStatusFunction · 0.85

Tested by

no test coverage detected