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

Function TestContext_YAML

apps/cli/internal/cli/context_test.go:318–337  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

316}
317
318func TestContext_YAML(t *testing.T) {
319 tmpDir := createContextTestFiles(t)
320 resetContextFlags()
321 taskDir = tmpDir
322 setupTestConfig(t, tmpDir)
323
324 ctxTaskID = "002"
325 ctxFormat = "yaml"
326 output, err := captureContextOutput(t)
327 if err != nil {
328 t.Fatalf("unexpected error: %v", err)
329 }
330
331 if !strings.Contains(output, "task_id:") {
332 t.Errorf("expected YAML task_id field, got: %s", output)
333 }
334 if !strings.Contains(output, "docs/readme.md") {
335 t.Errorf("expected docs/readme.md in YAML, got: %s", output)
336 }
337}
338
339func TestContext_IncludeContent(t *testing.T) {
340 tmpDir := createContextTestFiles(t)

Callers

nothing calls this directly

Calls 4

createContextTestFilesFunction · 0.85
resetContextFlagsFunction · 0.85
setupTestConfigFunction · 0.85
captureContextOutputFunction · 0.85

Tested by

no test coverage detected