MCPcopy Index your code
hub / github.com/conventionalcommit/commitlint / TestTrailerExists_Missing_Fail

Function TestTrailerExists_Missing_Fail

test/rule_test.go:1263–1272  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1261}
1262
1263func TestTrailerExists_Missing_Fail(t *testing.T) {
1264 r := &rule.TrailerExistsRule{}
1265 if err := r.Apply(lint.RuleSetting{Argument: "Co-authored-by:"}); err != nil {
1266 t.Fatal(err)
1267 }
1268 _, ok := r.Validate(&mockCommit{})
1269 if ok {
1270 t.Error("commit without Co-authored-by note should fail")
1271 }
1272}
1273
1274// ============================================================
1275// Breaking-change-exclamation-mark rule

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected