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

Function TestParseProgress_IncludesLearnings

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

Source from the content-addressed store, hash-verified

78}
79
80func TestParseProgress_IncludesLearnings(t *testing.T) {
81 tmpDir := t.TempDir()
82 path := filepath.Join(tmpDir, "progress.md")
83
84 content := `## 2026-02-20 - US-001
85- Created the thing
86- Files changed: a.go, b.go
87- **Learnings for future iterations:**
88 - Always run tests first
89 - Use strict mode
90---
91`
92 if err := os.WriteFile(path, []byte(content), 0644); err != nil {
93 t.Fatalf("failed to write test file: %v", err)
94 }
95
96 entries, err := ParseProgress(path)
97 if err != nil {
98 t.Fatalf("ParseProgress failed: %v", err)
99 }
100
101 entry := entries["US-001"][0]
102 if !strings.Contains(entry.Content, "**Learnings for future iterations:**") {
103 t.Errorf("expected content to include learnings header, got: %s", entry.Content)
104 }
105 if !strings.Contains(entry.Content, "Always run tests first") {
106 t.Errorf("expected content to include learnings sub-bullet, got: %s", entry.Content)
107 }
108}
109
110func TestParseProgress_SkipsCodebasePatternsSection(t *testing.T) {
111 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 1

ParseProgressFunction · 0.85

Tested by

no test coverage detected