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

Function TestConfig_SeverityString

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

Source from the content-addressed store, hash-verified

429}
430
431func TestConfig_SeverityString(t *testing.T) {
432 tests := []struct {
433 severity lint.Severity
434 expected string
435 }{
436 {lint.SeverityError, "Error"},
437 {lint.SeverityWarn, "Warning"},
438 {lint.Severity("unknown"), "Severity(unknown)"},
439 }
440
441 for _, tc := range tests {
442 got := tc.severity.String()
443 if got != tc.expected {
444 t.Errorf("Severity(%q).String() = %q, want %q", tc.severity, got, tc.expected)
445 }
446 }
447}

Callers

nothing calls this directly

Calls 2

SeverityTypeAlias · 0.92
StringMethod · 0.45

Tested by

no test coverage detected