(t *testing.T)
| 73 | } |
| 74 | |
| 75 | func TestGetInitPrompt(t *testing.T) { |
| 76 | prdDir := "/path/to/.chief/prds/main" |
| 77 | |
| 78 | // Test with no context |
| 79 | prompt := GetInitPrompt(prdDir, "") |
| 80 | if !strings.Contains(prompt, "No additional context provided") { |
| 81 | t.Error("Expected default context message") |
| 82 | } |
| 83 | |
| 84 | // Verify PRD directory is substituted |
| 85 | if !strings.Contains(prompt, prdDir) { |
| 86 | t.Errorf("Expected prompt to contain PRD directory %q", prdDir) |
| 87 | } |
| 88 | if strings.Contains(prompt, "{{PRD_DIR}}") { |
| 89 | t.Error("Expected {{PRD_DIR}} to be substituted") |
| 90 | } |
| 91 | |
| 92 | // Test with context |
| 93 | context := "Build a todo app" |
| 94 | promptWithContext := GetInitPrompt(prdDir, context) |
| 95 | if !strings.Contains(promptWithContext, context) { |
| 96 | t.Error("Expected context to be substituted in prompt") |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | func TestGetEditPrompt(t *testing.T) { |
| 101 | prompt := GetEditPrompt("/test/path/prds/main") |
nothing calls this directly
no test coverage detected