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

Function TestHeadMinLen_Pass

test/rule_test.go:13–22  ·  view source on GitHub ↗

--- Header length rules ---

(t *testing.T)

Source from the content-addressed store, hash-verified

11// --- Header length rules ---
12
13func TestHeadMinLen_Pass(t *testing.T) {
14 r := &rule.HeadMinLenRule{}
15 if err := r.Apply(lint.RuleSetting{Argument: 10}); err != nil {
16 t.Fatal(err)
17 }
18 _, ok := r.Validate(&mockCommit{header: "feat: add new feature"})
19 if !ok {
20 t.Error("header length >= 10 should pass")
21 }
22}
23
24func TestHeadMinLen_Exact(t *testing.T) {
25 r := &rule.HeadMinLenRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected