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

Function TestScopeCaseRule_EmptyScopeAlwaysPasses

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

Source from the content-addressed store, hash-verified

694}
695
696func TestScopeCaseRule_EmptyScopeAlwaysPasses(t *testing.T) {
697 r := &rule.ScopeCaseRule{}
698 if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil {
699 t.Fatal(err)
700 }
701 _, ok := r.Validate(&mockCommit{scope: ""})
702 if !ok {
703 t.Error("empty scope should always pass scope-case")
704 }
705}
706
707func TestScopeCaseRule_Fail(t *testing.T) {
708 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