(t *testing.T)
| 78 | } |
| 79 | |
| 80 | func 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 | |
| 110 | func TestParseProgress_SkipsCodebasePatternsSection(t *testing.T) { |
| 111 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected