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

Function TestScopeEmptyRule_NonEmptyPasses

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

Source from the content-addressed store, hash-verified

858}
859
860func TestScopeEmptyRule_NonEmptyPasses(t *testing.T) {
861 r := &rule.ScopeEmptyRule{}
862 if err := r.Apply(lint.RuleSetting{}); err != nil {
863 t.Fatal(err)
864 }
865 _, ok := r.Validate(&mockCommit{scope: "auth"})
866 if !ok {
867 t.Error("non-empty scope should pass scope-empty rule")
868 }
869}
870
871func TestScopeEmptyRule_EmptyFails(t *testing.T) {
872 r := &rule.ScopeEmptyRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected