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

Function TestBodyMaxLineLen_Pass

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

Source from the content-addressed store, hash-verified

144}
145
146func TestBodyMaxLineLen_Pass(t *testing.T) {
147 r := &rule.BodyMaxLineLenRule{}
148 if err := r.Apply(lint.RuleSetting{Argument: 72}); err != nil {
149 t.Fatal(err)
150 }
151 _, ok := r.Validate(&mockCommit{body: "Short line 1.\nShort line 2."})
152 if !ok {
153 t.Error("all lines <= 72 should pass")
154 }
155}
156
157func TestBodyMaxLineLen_Fail(t *testing.T) {
158 r := &rule.BodyMaxLineLenRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected