From 9bce6478c17c5bd5fe4ebc607586e19ef6b6f671 Mon Sep 17 00:00:00 2001 From: lvlcn-t <75443136+lvlcn-t@users.noreply.github.com> Date: Sat, 2 Mar 2024 22:02:19 +0100 Subject: [PATCH] chore: test case naming --- internal/logger/extensions_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/logger/extensions_test.go b/internal/logger/extensions_test.go index aa7aad3..f4d0e5c 100644 --- a/internal/logger/extensions_test.go +++ b/internal/logger/extensions_test.go @@ -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 @@ -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 { @@ -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 },