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

Function TestScopeCaseRule_LowerPass

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

Source from the content-addressed store, hash-verified

683}
684
685func TestScopeCaseRule_LowerPass(t *testing.T) {
686 r := &rule.ScopeCaseRule{}
687 if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil {
688 t.Fatal(err)
689 }
690 _, ok := r.Validate(&mockCommit{scope: "auth"})
691 if !ok {
692 t.Error("lowercase scope should pass")
693 }
694}
695
696func TestScopeCaseRule_EmptyScopeAlwaysPasses(t *testing.T) {
697 r := &rule.ScopeCaseRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected