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

Function TestConfig_GetFormatterJSON

test/config_test.go:67–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestConfig_GetFormatterJSON(t *testing.T) {
68 conf := config.NewDefault()
69 conf.Formatter = "json"
70 f, err := config.GetFormatter(conf)
71 if err != nil {
72 t.Fatalf("unexpected error: %v", err)
73 }
74 if f.Name() != "json" {
75 t.Errorf("expected formatter name 'json', got %q", f.Name())
76 }
77}
78
79func TestConfig_GetFormatterUnknown(t *testing.T) {
80 conf := config.NewDefault()

Callers

nothing calls this directly

Calls 3

NewDefaultFunction · 0.92
GetFormatterFunction · 0.92
NameMethod · 0.65

Tested by

no test coverage detected