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

Function TestHeaderCaseRule_Fail

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

Source from the content-addressed store, hash-verified

818}
819
820func TestHeaderCaseRule_Fail(t *testing.T) {
821 r := &rule.HeaderCaseRule{}
822 if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil {
823 t.Fatal(err)
824 }
825 _, ok := r.Validate(&mockCommit{header: "Feat: Add feature"})
826 if ok {
827 t.Error("capitalized header should fail lower-case rule")
828 }
829}
830
831// ============================================================
832// Empty rules

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected