MCPcopy Index your code
hub / github.com/MiniCodeMonkey/chief / createMockClaudeScript

Function createMockClaudeScript

internal/loop/loop_test.go:48–62  ·  view source on GitHub ↗

createMockClaudeScript creates a shell script that outputs predefined stream-json.

(t *testing.T, dir string, output []string)

Source from the content-addressed store, hash-verified

46
47// createMockClaudeScript creates a shell script that outputs predefined stream-json.
48func createMockClaudeScript(t *testing.T, dir string, output []string) string {
49 t.Helper()
50
51 scriptPath := filepath.Join(dir, "mock-claude")
52 content := "#!/bin/bash\n"
53 for _, line := range output {
54 content += "echo '" + line + "'\n"
55 }
56
57 if err := os.WriteFile(scriptPath, []byte(content), 0755); err != nil {
58 t.Fatalf("Failed to create mock script: %v", err)
59 }
60
61 return scriptPath
62}
63
64// createTestPRD creates a minimal test PRD markdown file.
65func createTestPRD(t *testing.T, dir string, allComplete bool) string {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected