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

Function TestDescMinLen_Pass

test/rule_test.go:441–450  ·  view source on GitHub ↗

--- Description length rules ---

(t *testing.T)

Source from the content-addressed store, hash-verified

439// --- Description length rules ---
440
441func TestDescMinLen_Pass(t *testing.T) {
442 r := &rule.DescriptionMinLenRule{}
443 if err := r.Apply(lint.RuleSetting{Argument: 5}); err != nil {
444 t.Fatal(err)
445 }
446 _, ok := r.Validate(&mockCommit{description: "add new feature"})
447 if !ok {
448 t.Error("desc len >= 5 should pass")
449 }
450}
451
452func TestDescMinLen_Fail(t *testing.T) {
453 r := &rule.DescriptionMinLenRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected