MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / TestHeadMaxLen_Exact

Function TestHeadMaxLen_Exact

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

Source from the content-addressed store, hash-verified

65}
66
67func TestHeadMaxLen_Exact(t *testing.T) {
68 r := &rule.HeadMaxLenRule{}
69 if err := r.Apply(lint.RuleSetting{Argument: 10}); err != nil {
70 t.Fatal(err)
71 }
72 _, ok := r.Validate(&mockCommit{header: "0123456789"})
73 if !ok {
74 t.Error("header == max should pass")
75 }
76}
77
78func TestHeadMaxLen_Fail(t *testing.T) {
79 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