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

Function TestIgnore_AutomaticMerge

test/ignore_test.go:107–122  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func TestIgnore_AutomaticMerge(t *testing.T) {
108 msgs := []string{
109 "Automatic merge from release/1.0 to main",
110 "Auto-merged feature-x into main",
111 }
112 linter := newDefaultLinter(t)
113 for _, msg := range msgs {
114 result, err := linter.ParseAndLint(msg)
115 if err != nil {
116 t.Fatalf("error for %q: %v", msg, err)
117 }
118 if len(result.Issues()) != 0 {
119 t.Errorf("expected %q to be ignored, got %d issues", msg, len(result.Issues()))
120 }
121 }
122}
123
124func TestIgnore_InitialCommit(t *testing.T) {
125 linter := newDefaultLinter(t)

Callers

nothing calls this directly

Calls 3

newDefaultLinterFunction · 0.85
ParseAndLintMethod · 0.80
IssuesMethod · 0.80

Tested by

no test coverage detected