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

Function TestDescriptionCaseRule_Fail

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

Source from the content-addressed store, hash-verified

727}
728
729func TestDescriptionCaseRule_Fail(t *testing.T) {
730 r := &rule.DescriptionCaseRule{}
731 if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil {
732 t.Fatal(err)
733 }
734 _, ok := r.Validate(&mockCommit{description: "Add new feature"})
735 if ok {
736 t.Error("capitalized description should fail lower-case rule")
737 }
738}
739
740func TestBodyCaseRule_LowerPass(t *testing.T) {
741 r := &rule.BodyCaseRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected