Skip to content

Commit

Permalink
chore: test case naming
Browse files Browse the repository at this point in the history
  • Loading branch information
lvlcn-t committed Mar 2, 2024
1 parent 5acff8d commit 9bce647
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/logger/extensions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ func TestLogger_LevelExtensions(t *testing.T) {
}

func TestLogger_PanicLevel(t *testing.T) {
ctx := context.Background()
tests := []struct {
name string
attrs []any
Expand Down Expand Up @@ -203,10 +202,10 @@ func TestLogger_PanicLevel(t *testing.T) {
},
},
{
name: "panic level context",
name: "panic context level",
attrs: []any{"key", "value"},
logFunc: func(l Logger, msg string, args ...any) {
l.PanicContext(ctx, msg, args...)
l.PanicContext(context.Background(), msg, args...)
},
handler: test.MockHandler{
HandleFunc: func(ctx context.Context, r slog.Record) error {
Expand All @@ -215,7 +214,7 @@ func TestLogger_PanicLevel(t *testing.T) {
t.Errorf("Expected level to be [%s], got [%s]", getLevelString(level), r.Level)
}
if r.NumAttrs() == 0 {
t.Errorf("Expected attributes, got %d", r.NumAttrs())
t.Errorf("Expected attributes, got %d", r.NumAttrs())
}
return nil
},
Expand Down

0 comments on commit 9bce647

Please sign in to comment.