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

Function TestBodyEmptyRule_EmptyFails

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

Source from the content-addressed store, hash-verified

891}
892
893func TestBodyEmptyRule_EmptyFails(t *testing.T) {
894 r := &rule.BodyEmptyRule{}
895 if err := r.Apply(lint.RuleSetting{}); err != nil {
896 t.Fatal(err)
897 }
898 _, ok := r.Validate(&mockCommit{body: ""})
899 if ok {
900 t.Error("empty body should fail body-empty rule")
901 }
902}
903
904func TestFooterEmptyRule_NonEmptyPasses(t *testing.T) {
905 r := &rule.FooterEmptyRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected