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

Function createGetTestFiles

apps/cli/internal/cli/get_test.go:14–75  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func createGetTestFiles(t *testing.T) string {
15 t.Helper()
16
17 tmpDir := t.TempDir()
18
19 tasks := map[string]string{
20 "001-setup.md": `---
21id: "001"
22title: "Setup project"
23status: completed
24priority: high
25effort: small
26dependencies: []
27tags: ["infra", "setup"]
28created: 2026-02-08
29---
30
31# Setup project
32
33Initial project setup with build tooling.
34`,
35 "002-auth.md": `---
36id: "002"
37title: "Implement authentication"
38status: in-progress
39priority: critical
40effort: large
41dependencies: ["001"]
42tags: ["backend", "security"]
43created: 2026-02-08
44---
45
46# Implement authentication
47
48Add JWT-based auth with refresh tokens.
49`,
50 "003-ui.md": `---
51id: "003"
52title: "Build UI components"
53status: pending
54priority: medium
55effort: medium
56dependencies: ["002"]
57tags: ["frontend"]
58created: 2026-02-08
59---
60
61# Build UI components
62
63Create reusable component library.
64`,
65 }
66
67 for filename, content := range tasks {
68 path := filepath.Join(tmpDir, filename)
69 if err := os.WriteFile(path, []byte(content), 0644); err != nil {
70 t.Fatalf("Failed to create test file %s: %v", filename, err)
71 }

Calls

no outgoing calls

Tested by

no test coverage detected