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

Function TestBodyEmptyRule_NonEmptyPasses

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

Source from the content-addressed store, hash-verified

880}
881
882func TestBodyEmptyRule_NonEmptyPasses(t *testing.T) {
883 r := &rule.BodyEmptyRule{}
884 if err := r.Apply(lint.RuleSetting{}); err != nil {
885 t.Fatal(err)
886 }
887 _, ok := r.Validate(&mockCommit{body: "some body"})
888 if !ok {
889 t.Error("non-empty body should pass body-empty rule")
890 }
891}
892
893func TestBodyEmptyRule_EmptyFails(t *testing.T) {
894 r := &rule.BodyEmptyRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected