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

Function TestBodyCaseRule_MultiLine_AllFail

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

Source from the content-addressed store, hash-verified

771}
772
773func TestBodyCaseRule_MultiLine_AllFail(t *testing.T) {
774 r := &rule.BodyCaseRule{}
775 if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil {
776 t.Fatal(err)
777 }
778 // Entire body fails lower-case (uppercase letters present)
779 _, ok := r.Validate(&mockCommit{body: "First line capitalized\nSecond line capitalized"})
780 if ok {
781 t.Error("body with uppercase letters should fail lower-case rule")
782 }
783}
784
785func TestBodyCaseRule_MultiLine_SomeFail(t *testing.T) {
786 r := &rule.BodyCaseRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected