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

Function TestHeadMinLen_Exact

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

Source from the content-addressed store, hash-verified

22}
23
24func TestHeadMinLen_Exact(t *testing.T) {
25 r := &rule.HeadMinLenRule{}
26 if err := r.Apply(lint.RuleSetting{Argument: 10}); err != nil {
27 t.Fatal(err)
28 }
29 _, ok := r.Validate(&mockCommit{header: "0123456789"})
30 if !ok {
31 t.Error("header length == 10 should pass")
32 }
33}
34
35func TestHeadMinLen_Fail(t *testing.T) {
36 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