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

Function TestFooterLeadingBlank_WithoutBlank_Fail

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

Source from the content-addressed store, hash-verified

1121}
1122
1123func TestFooterLeadingBlank_WithoutBlank_Fail(t *testing.T) {
1124 r := &rule.FooterLeadingBlankRule{}
1125 if err := r.Apply(lint.RuleSetting{}); err != nil {
1126 t.Fatal(err)
1127 }
1128 msg := &mockCommit{
1129 message: "feat: add feature\nbody text\nFixes: #123",
1130 footer: "Fixes: #123",
1131 }
1132 _, ok := r.Validate(msg)
1133 if ok {
1134 t.Error("footer without leading blank should fail")
1135 }
1136}
1137
1138func TestFooterLeadingBlank_EmptyFooter_Pass(t *testing.T) {
1139 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