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

Function TestScopeCharset_Pass

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

Source from the content-addressed store, hash-verified

415}
416
417func TestScopeCharset_Pass(t *testing.T) {
418 r := &rule.ScopeCharsetRule{}
419 if err := r.Apply(lint.RuleSetting{Argument: "abcdefghijklmnopqrstuvwxyz/"}); err != nil {
420 t.Fatal(err)
421 }
422 _, ok := r.Validate(&mockCommit{scope: "auth/core"})
423 if !ok {
424 t.Error("scope with / should pass")
425 }
426}
427
428func TestScopeCharset_Fail(t *testing.T) {
429 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