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

Function TestScopeCaseRule_Fail

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

Source from the content-addressed store, hash-verified

705}
706
707func TestScopeCaseRule_Fail(t *testing.T) {
708 r := &rule.ScopeCaseRule{}
709 if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil {
710 t.Fatal(err)
711 }
712 _, ok := r.Validate(&mockCommit{scope: "Auth"})
713 if ok {
714 t.Error("uppercase scope should fail lower-case rule")
715 }
716}
717
718func TestDescriptionCaseRule_LowerPass(t *testing.T) {
719 r := &rule.DescriptionCaseRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected