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

Function TestContext_MissingFiles

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

Source from the content-addressed store, hash-verified

252}
253
254func TestContext_MissingFiles(t *testing.T) {
255 tmpDir := createContextTestFiles(t)
256 resetContextFlags()
257 taskDir = tmpDir
258 setupTestConfig(t, tmpDir)
259
260 ctxTaskID = "006"
261 output, err := captureContextOutput(t)
262 if err != nil {
263 t.Fatalf("unexpected error: %v", err)
264 }
265
266 if !strings.Contains(output, "does/not/exist.go") {
267 t.Errorf("expected missing file path in output, got: %s", output)
268 }
269 if !strings.Contains(output, "missing") {
270 t.Errorf("expected (missing) annotation, got: %s", output)
271 }
272}
273
274func TestContext_JSON(t *testing.T) {
275 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