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

Function TestGetInitPrompt

embed/embed_test.go:75–98  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

73}
74
75func 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
100func TestGetEditPrompt(t *testing.T) {
101 prompt := GetEditPrompt("/test/path/prds/main")

Callers

nothing calls this directly

Calls 1

GetInitPromptFunction · 0.85

Tested by

no test coverage detected