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

Function TestDescMinLen_Fail

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

Source from the content-addressed store, hash-verified

450}
451
452func TestDescMinLen_Fail(t *testing.T) {
453 r := &rule.DescriptionMinLenRule{}
454 if err := r.Apply(lint.RuleSetting{Argument: 20}); err != nil {
455 t.Fatal(err)
456 }
457 _, ok := r.Validate(&mockCommit{description: "short"})
458 if ok {
459 t.Error("desc len < 20 should fail")
460 }
461}
462
463func TestDescMaxLen_NegativeDisables(t *testing.T) {
464 r := &rule.DescriptionMaxLenRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected