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

Function TestParseMarkdownPRD_File

internal/prd/markdown_test.go:270–293  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

268}
269
270func TestParseMarkdownPRD_File(t *testing.T) {
271 tmpDir := t.TempDir()
272 prdPath := filepath.Join(tmpDir, "prd.md")
273
274 md := `# Test
275
276### US-001: First Story
277- [ ] Works
278`
279 if err := os.WriteFile(prdPath, []byte(md), 0644); err != nil {
280 t.Fatalf("failed to write: %v", err)
281 }
282
283 p, err := ParseMarkdownPRD(prdPath)
284 if err != nil {
285 t.Fatalf("ParseMarkdownPRD() error = %v", err)
286 }
287 if p.Project != "Test" {
288 t.Errorf("Project = %q", p.Project)
289 }
290 if len(p.UserStories) != 1 {
291 t.Fatalf("len(UserStories) = %d", len(p.UserStories))
292 }
293}
294
295func TestParseMarkdownPRD_FileNotFound(t *testing.T) {
296 _, err := ParseMarkdownPRD("/nonexistent/prd.md")

Callers

nothing calls this directly

Calls 1

ParseMarkdownPRDFunction · 0.85

Tested by

no test coverage detected