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

Function TestFooterEnum_Invalid

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

Source from the content-addressed store, hash-verified

489}
490
491func TestFooterEnum_Invalid(t *testing.T) {
492 r := &rule.FooterEnumRule{}
493 if err := r.Apply(lint.RuleSetting{Argument: []interface{}{"Fixes"}}); err != nil {
494 t.Fatal(err)
495 }
496 _, ok := r.Validate(&mockCommit{
497 notes: []lint.Note{&mockNote{token: "Unknown-Token", value: "val"}},
498 })
499 if ok {
500 t.Error("unknown footer token should fail")
501 }
502}
503
504func TestFooterEnum_EmptyTokenList(t *testing.T) {
505 r := &rule.FooterEnumRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected