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

Function TestScopeEmptyRule_EmptyFails

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

Source from the content-addressed store, hash-verified

869}
870
871func TestScopeEmptyRule_EmptyFails(t *testing.T) {
872 r := &rule.ScopeEmptyRule{}
873 if err := r.Apply(lint.RuleSetting{}); err != nil {
874 t.Fatal(err)
875 }
876 _, ok := r.Validate(&mockCommit{scope: ""})
877 if ok {
878 t.Error("empty scope should fail scope-empty rule")
879 }
880}
881
882func TestBodyEmptyRule_NonEmptyPasses(t *testing.T) {
883 r := &rule.BodyEmptyRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected