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

Function TestHeadMaxLen_Pass

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

Source from the content-addressed store, hash-verified

54}
55
56func TestHeadMaxLen_Pass(t *testing.T) {
57 r := &rule.HeadMaxLenRule{}
58 if err := r.Apply(lint.RuleSetting{Argument: 50}); err != nil {
59 t.Fatal(err)
60 }
61 _, ok := r.Validate(&mockCommit{header: "feat: short"})
62 if !ok {
63 t.Error("header <= 50 should pass")
64 }
65}
66
67func TestHeadMaxLen_Exact(t *testing.T) {
68 r := &rule.HeadMaxLenRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected