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

Function TestBodyMaxLen_NegativeDisables

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

Source from the content-addressed store, hash-verified

122}
123
124func TestBodyMaxLen_NegativeDisables(t *testing.T) {
125 r := &rule.BodyMaxLenRule{}
126 if err := r.Apply(lint.RuleSetting{Argument: -1}); err != nil {
127 t.Fatal(err)
128 }
129 _, ok := r.Validate(&mockCommit{body: "very long body text here that would normally fail"})
130 if !ok {
131 t.Error("max=-1 should disable check")
132 }
133}
134
135func TestBodyMaxLen_Fail(t *testing.T) {
136 r := &rule.BodyMaxLenRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected