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

Function TestDescriptionEmptyRule_EmptyFails

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

Source from the content-addressed store, hash-verified

935}
936
937func TestDescriptionEmptyRule_EmptyFails(t *testing.T) {
938 r := &rule.DescriptionEmptyRule{}
939 if err := r.Apply(lint.RuleSetting{}); err != nil {
940 t.Fatal(err)
941 }
942 _, ok := r.Validate(&mockCommit{description: ""})
943 if ok {
944 t.Error("empty description should fail description-empty rule")
945 }
946}
947
948// ============================================================
949// Full-stop rules

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected