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

Function TestParseProgress_MultipleStories

internal/prd/progress_test.go:47–78  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

45}
46
47func TestParseProgress_MultipleStories(t *testing.T) {
48 tmpDir := t.TempDir()
49 path := filepath.Join(tmpDir, "progress.md")
50
51 content := `## 2026-02-20 - US-001
52- First story work
53---
54
55## 2026-02-20 - US-002
56- Second story work
57- More work
58---
59`
60 if err := os.WriteFile(path, []byte(content), 0644); err != nil {
61 t.Fatalf("failed to write test file: %v", err)
62 }
63
64 entries, err := ParseProgress(path)
65 if err != nil {
66 t.Fatalf("ParseProgress failed: %v", err)
67 }
68
69 if len(entries["US-001"]) != 1 {
70 t.Errorf("expected 1 entry for US-001, got %d", len(entries["US-001"]))
71 }
72 if len(entries["US-002"]) != 1 {
73 t.Errorf("expected 1 entry for US-002, got %d", len(entries["US-002"]))
74 }
75 if !strings.Contains(entries["US-002"][0].Content, "More work") {
76 t.Errorf("expected US-002 content to contain 'More work'")
77 }
78}
79
80func TestParseProgress_IncludesLearnings(t *testing.T) {
81 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 1

ParseProgressFunction · 0.85

Tested by

no test coverage detected