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

Function TestScopeMaxLen_NegativeDisables

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

Source from the content-addressed store, hash-verified

404}
405
406func TestScopeMaxLen_NegativeDisables(t *testing.T) {
407 r := &rule.ScopeMaxLenRule{}
408 if err := r.Apply(lint.RuleSetting{Argument: -1}); err != nil {
409 t.Fatal(err)
410 }
411 _, ok := r.Validate(&mockCommit{scope: "very-long-scope-name"})
412 if !ok {
413 t.Error("max=-1 should disable check")
414 }
415}
416
417func TestScopeCharset_Pass(t *testing.T) {
418 r := &rule.ScopeCharsetRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected