MCPcopy Create free account
hub / github.com/driangle/taskmd / createSearchTestFiles

Function createSearchTestFiles

apps/cli/internal/cli/search_test.go:24–83  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22}
23
24func createSearchTestFiles(t *testing.T) string {
25 t.Helper()
26 tmpDir := t.TempDir()
27
28 files := map[string]string{
29 "001-auth.md": `---
30id: "001"
31title: "Implement authentication system"
32status: pending
33priority: high
34tags:
35 - security
36created: 2026-01-01
37---
38
39# Implement authentication system
40
41Add JWT-based authentication with login and logout endpoints.
42Include token refresh and session management.
43`,
44 "002-deploy.md": `---
45id: "002"
46title: "Set up deployment pipeline"
47status: in-progress
48priority: medium
49tags:
50 - devops
51created: 2026-01-02
52---
53
54# Set up deployment pipeline
55
56Configure CI/CD with automated testing and staging environment.
57The authentication service should be deployed first.
58`,
59 "003-docs.md": `---
60id: "003"
61title: "Write API documentation"
62status: completed
63priority: low
64tags:
65 - docs
66created: 2026-01-03
67---
68
69# Write API documentation
70
71Document all REST endpoints including request and response schemas.
72`,
73 }
74
75 for name, content := range files {
76 err := os.WriteFile(filepath.Join(tmpDir, name), []byte(content), 0644)
77 if err != nil {
78 t.Fatalf("failed to create test file %s: %v", name, err)
79 }
80 }
81

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected