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

Function TestVerify_Fail

apps/cli/internal/cli/verify_test.go:200–220  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

198}
199
200func TestVerify_Fail(t *testing.T) {
201 tmpDir := createVerifyTestFiles(t)
202 resetVerifyFlags()
203 taskDir = tmpDir
204 verifyTaskID = "002"
205
206 output, err := captureVerifyOutput(t)
207 if err == nil {
208 t.Fatal("expected error for failing check")
209 }
210 if !errors.Is(err, ErrVerifyFailed) {
211 t.Fatalf("expected ErrVerifyFailed, got: %v", err)
212 }
213
214 if !strings.Contains(output, "FAIL") {
215 t.Errorf("expected FAIL in output, got: %s", output)
216 }
217 if !strings.Contains(output, "1 failed") {
218 t.Errorf("expected '1 failed' in output, got: %s", output)
219 }
220}
221
222func TestVerify_Assert(t *testing.T) {
223 tmpDir := createVerifyTestFiles(t)

Callers

nothing calls this directly

Calls 3

createVerifyTestFilesFunction · 0.85
resetVerifyFlagsFunction · 0.85
captureVerifyOutputFunction · 0.85

Tested by

no test coverage detected