(t *testing.T)
| 16 | } |
| 17 | |
| 18 | func TestDefaultFormatter_NoIssues(t *testing.T) { |
| 19 | linter := newDefaultLinter(t) |
| 20 | result, err := linter.ParseAndLint("feat: valid commit message") |
| 21 | if err != nil { |
| 22 | t.Fatal(err) |
| 23 | } |
| 24 | f := &formatter.DefaultFormatter{} |
| 25 | out, fErr := f.Format(result) |
| 26 | if fErr != nil { |
| 27 | t.Fatal(fErr) |
| 28 | } |
| 29 | if !strings.Contains(out, "\u2714") { |
| 30 | t.Errorf("expected checkmark for valid commit, got %q", out) |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | func TestDefaultFormatter_WithIssues(t *testing.T) { |
| 35 | linter := newDefaultLinter(t) |
nothing calls this directly
no test coverage detected