MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / TestBodyLeadingBlank_EmptyBody_Pass

Function TestBodyLeadingBlank_EmptyBody_Pass

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

Source from the content-addressed store, hash-verified

1095}
1096
1097func TestBodyLeadingBlank_EmptyBody_Pass(t *testing.T) {
1098 r := &rule.BodyLeadingBlankRule{}
1099 if err := r.Apply(lint.RuleSetting{}); err != nil {
1100 t.Fatal(err)
1101 }
1102 _, ok := r.Validate(&mockCommit{body: ""})
1103 if !ok {
1104 t.Error("empty body should pass body-leading-blank")
1105 }
1106}
1107
1108func TestFooterLeadingBlank_WithBlank_Pass(t *testing.T) {
1109 r := &rule.FooterLeadingBlankRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected