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

Function TestBodyFullStop_WithStop_Fail

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

Source from the content-addressed store, hash-verified

1005}
1006
1007func TestBodyFullStop_WithStop_Fail(t *testing.T) {
1008 r := &rule.BodyFullStopRule{}
1009 if err := r.Apply(lint.RuleSetting{Argument: "."}); err != nil {
1010 t.Fatal(err)
1011 }
1012 _, ok := r.Validate(&mockCommit{body: "This is the body."})
1013 if ok {
1014 t.Error("body ending with '.' should fail")
1015 }
1016}
1017
1018func TestBodyFullStop_EmptyBody_Pass(t *testing.T) {
1019 r := &rule.BodyFullStopRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected