Skip to content

Commit

Permalink
Merge pull request #5 from tjhop/test/use-require-more
Browse files Browse the repository at this point in the history
test: use require more
  • Loading branch information
tjhop authored Jan 11, 2025
2 parents 8dfe7b4 + 71eb92e commit b7c1bf3
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,14 @@ func TestNewGoKitHandler(t *testing.T) {
}
ms = append(ms, m)
}
if err := dec.Err(); err != nil {
t.Fatal(err)
}
err := dec.Err()
require.NoError(t, err, "failed to decode logfmt entry")

return ms
}

err := slogtest.TestHandler(h, results)
if err != nil {
t.Fatal(err)
}
require.NoError(t, err, "failed slog handler test suite")
})
t.Run("debug level", func(t *testing.T) {
var buf bytes.Buffer
Expand All @@ -73,17 +70,14 @@ func TestNewGoKitHandler(t *testing.T) {
}
ms = append(ms, m)
}
if err := dec.Err(); err != nil {
t.Fatal(err)
}
err := dec.Err()
require.NoError(t, err, "failed to decode logfmt entry")

return ms
}

err := slogtest.TestHandler(h, results)
if err != nil {
t.Fatal(err)
}
require.NoError(t, err, "failed slog handler test suite")
})
t.Run("dynamic level", func(t *testing.T) {
var buf bytes.Buffer
Expand Down

0 comments on commit b7c1bf3

Please sign in to comment.