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

Function TestCommitMsg_EmptyDiff

apps/cli/internal/cli/commit_msg_test.go:463–477  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

461}
462
463func TestCommitMsg_EmptyDiff(t *testing.T) {
464 tmpDir := createCommitMsgTestFiles(t)
465 resetCommitMsgFlags()
466 taskDir = tmpDir
467
468 mockGitDiffAndRoot(t, "", tmpDir)
469
470 _, err := captureCommitMsgOutput(t)
471 if err == nil {
472 t.Fatal("expected error for empty diff")
473 }
474 if !strings.Contains(err.Error(), "no task changes found") {
475 t.Errorf("expected 'no task changes found' error, got: %v", err)
476 }
477}
478
479func TestCommitMsg_DiffOnlyInProgress(t *testing.T) {
480 tmpDir := createCommitMsgTestFiles(t)

Callers

nothing calls this directly

Calls 5

createCommitMsgTestFilesFunction · 0.85
resetCommitMsgFlagsFunction · 0.85
mockGitDiffAndRootFunction · 0.85
captureCommitMsgOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected