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

Function TestFooterLeadingBlank_WithBlank_Pass

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

Source from the content-addressed store, hash-verified

1106}
1107
1108func TestFooterLeadingBlank_WithBlank_Pass(t *testing.T) {
1109 r := &rule.FooterLeadingBlankRule{}
1110 if err := r.Apply(lint.RuleSetting{}); err != nil {
1111 t.Fatal(err)
1112 }
1113 msg := &mockCommit{
1114 message: "feat: add feature\n\nbody text\n\nFixes: #123",
1115 footer: "Fixes: #123",
1116 }
1117 _, ok := r.Validate(msg)
1118 if !ok {
1119 t.Error("footer with leading blank should pass")
1120 }
1121}
1122
1123func TestFooterLeadingBlank_WithoutBlank_Fail(t *testing.T) {
1124 r := &rule.FooterLeadingBlankRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected