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

Function TestDefaultFormatter_NoIssues

test/formatter_test.go:18–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16}
17
18func 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
34func TestDefaultFormatter_WithIssues(t *testing.T) {
35 linter := newDefaultLinter(t)

Callers

nothing calls this directly

Calls 3

FormatMethod · 0.95
newDefaultLinterFunction · 0.85
ParseAndLintMethod · 0.80

Tested by

no test coverage detected