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

Function TestHeaderFullStop_NoStop_Pass

test/rule_test.go:952–961  ·  view source on GitHub ↗

============================================================ Full-stop rules ============================================================

(t *testing.T)

Source from the content-addressed store, hash-verified

950// ============================================================
951
952func TestHeaderFullStop_NoStop_Pass(t *testing.T) {
953 r := &rule.HeaderFullStopRule{}
954 if err := r.Apply(lint.RuleSetting{Argument: "."}); err != nil {
955 t.Fatal(err)
956 }
957 _, ok := r.Validate(&mockCommit{header: "feat: add new feature"})
958 if !ok {
959 t.Error("header not ending with '.' should pass")
960 }
961}
962
963func TestHeaderFullStop_WithStop_Fail(t *testing.T) {
964 r := &rule.HeaderFullStopRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected