MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / TestLevel_String

Function TestLevel_String

internal/logger/logger_test.go:14–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestLevel_String(t *testing.T) {
15 tests := []struct {
16 name string
17 level Level
18 expected string
19 }{
20 {"debug level", LevelDebug, "DEBUG"},
21 {"info level", LevelInfo, "INFO"},
22 {"error level", LevelError, "ERROR"},
23 {"unknown level", Level(999), "UNKNOWN"},
24 }
25
26 for _, tt := range tests {
27 t.Run(tt.name, func(t *testing.T) {
28 assert.Equal(t, tt.expected, tt.level.String())
29 })
30 }
31}
32
33func TestDefaultConfig(t *testing.T) {
34 config := DefaultConfig()

Callers

nothing calls this directly

Calls 3

LevelTypeAlias · 0.85
RunMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected