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

Function TestHeaderCaseRule_LowerPass

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

Source from the content-addressed store, hash-verified

807}
808
809func TestHeaderCaseRule_LowerPass(t *testing.T) {
810 r := &rule.HeaderCaseRule{}
811 if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil {
812 t.Fatal(err)
813 }
814 _, ok := r.Validate(&mockCommit{header: "feat: add feature"})
815 if !ok {
816 t.Error("lowercase header should pass")
817 }
818}
819
820func TestHeaderCaseRule_Fail(t *testing.T) {
821 r := &rule.HeaderCaseRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected