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

Function TestDescriptionEmptyRule_NonEmptyPasses

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

Source from the content-addressed store, hash-verified

924}
925
926func TestDescriptionEmptyRule_NonEmptyPasses(t *testing.T) {
927 r := &rule.DescriptionEmptyRule{}
928 if err := r.Apply(lint.RuleSetting{}); err != nil {
929 t.Fatal(err)
930 }
931 _, ok := r.Validate(&mockCommit{description: "add new feature"})
932 if !ok {
933 t.Error("non-empty description should pass description-empty rule")
934 }
935}
936
937func TestDescriptionEmptyRule_EmptyFails(t *testing.T) {
938 r := &rule.DescriptionEmptyRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected