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

Function TestIgnore_MergePullRequest

test/ignore_test.go:12–27  ·  view source on GitHub ↗

--- Ignore pattern tests ---

(t *testing.T)

Source from the content-addressed store, hash-verified

10// --- Ignore pattern tests ---
11
12func TestIgnore_MergePullRequest(t *testing.T) {
13 msgs := []string{
14 "Merge pull request #123 from owner/branch",
15 "Merge pull request #1 from a/b",
16 }
17 linter := newDefaultLinter(t)
18 for _, msg := range msgs {
19 result, err := linter.ParseAndLint(msg)
20 if err != nil {
21 t.Fatalf("error for %q: %v", msg, err)
22 }
23 if len(result.Issues()) != 0 {
24 t.Errorf("expected %q to be ignored, got %d issues", msg, len(result.Issues()))
25 }
26 }
27}
28
29func TestIgnore_MergeBranch(t *testing.T) {
30 msgs := []string{

Callers

nothing calls this directly

Calls 3

newDefaultLinterFunction · 0.85
ParseAndLintMethod · 0.80
IssuesMethod · 0.80

Tested by

no test coverage detected