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

Function TestBodyCaseRule_EmptyBodyAlwaysPasses

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

Source from the content-addressed store, hash-verified

749}
750
751func TestBodyCaseRule_EmptyBodyAlwaysPasses(t *testing.T) {
752 r := &rule.BodyCaseRule{}
753 if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil {
754 t.Fatal(err)
755 }
756 _, ok := r.Validate(&mockCommit{body: ""})
757 if !ok {
758 t.Error("empty body should pass body-case")
759 }
760}
761
762func TestBodyCaseRule_Fail(t *testing.T) {
763 r := &rule.BodyCaseRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected