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

Function TestContext_Dependencies

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

Source from the content-addressed store, hash-verified

470}
471
472func TestContext_Dependencies(t *testing.T) {
473 tmpDir := createContextTestFiles(t)
474 resetContextFlags()
475 taskDir = tmpDir
476 setupTestConfig(t, tmpDir)
477
478 ctxTaskID = "004"
479 output, err := captureContextOutput(t)
480 if err != nil {
481 t.Fatalf("unexpected error: %v", err)
482 }
483
484 if !strings.Contains(output, "Dependencies") {
485 t.Errorf("expected Dependencies section, got: %s", output)
486 }
487 if !strings.Contains(output, "001") {
488 t.Errorf("expected dependency ID 001, got: %s", output)
489 }
490}
491
492// setupTestConfig sets viper to read the .taskmd.yaml from the test directory.
493func setupTestConfig(t *testing.T, dir string) {

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