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

Function TestDescriptionFullStop_WithStop_Fail

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

Source from the content-addressed store, hash-verified

1038}
1039
1040func TestDescriptionFullStop_WithStop_Fail(t *testing.T) {
1041 r := &rule.DescriptionFullStopRule{}
1042 if err := r.Apply(lint.RuleSetting{Argument: "."}); err != nil {
1043 t.Fatal(err)
1044 }
1045 _, ok := r.Validate(&mockCommit{description: "add new feature."})
1046 if ok {
1047 t.Error("description ending with '.' should fail")
1048 }
1049}
1050
1051func TestDescriptionFullStop_EmptyDescription_Pass(t *testing.T) {
1052 r := &rule.DescriptionFullStopRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected