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

Function TestScopeMinLen_Pass

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

Source from the content-addressed store, hash-verified

393}
394
395func TestScopeMinLen_Pass(t *testing.T) {
396 r := &rule.ScopeMinLenRule{}
397 if err := r.Apply(lint.RuleSetting{Argument: 2}); err != nil {
398 t.Fatal(err)
399 }
400 _, ok := r.Validate(&mockCommit{scope: "auth"})
401 if !ok {
402 t.Error("scope len >= 2 should pass")
403 }
404}
405
406func TestScopeMaxLen_NegativeDisables(t *testing.T) {
407 r := &rule.ScopeMaxLenRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected