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

Function TestBodyMaxLineLen_EmptyBody

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

Source from the content-addressed store, hash-verified

169}
170
171func TestBodyMaxLineLen_EmptyBody(t *testing.T) {
172 r := &rule.BodyMaxLineLenRule{}
173 if err := r.Apply(lint.RuleSetting{Argument: 72}); err != nil {
174 t.Fatal(err)
175 }
176 _, ok := r.Validate(&mockCommit{body: ""})
177 if !ok {
178 t.Error("empty body should pass")
179 }
180}
181
182// --- Footer length rules ---
183

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected