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

Function TestFooterMaxLen_NegativeDisables

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

Source from the content-addressed store, hash-verified

193}
194
195func TestFooterMaxLen_NegativeDisables(t *testing.T) {
196 r := &rule.FooterMaxLenRule{}
197 if err := r.Apply(lint.RuleSetting{Argument: -1}); err != nil {
198 t.Fatal(err)
199 }
200 _, ok := r.Validate(&mockCommit{footer: "Very long footer text"})
201 if !ok {
202 t.Error("max=-1 should disable check")
203 }
204}
205
206func TestFooterMaxLineLen_Pass(t *testing.T) {
207 r := &rule.FooterMaxLineLenRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected