slogtest

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(t *testing.T, f func(t *rapid.T, logger *slog.Logger))

Check runs a Rapid property test while collecting any log and slog output that it produces. If the test fails, we will display the collected log output of the final failing test instance.

func NewLogger

func NewLogger(w io.Writer) *slog.Logger

func WithLogger

func WithLogger(t *testing.T, f func(t *testing.T, logger *slog.Logger))

WithLogger runs a test function while collecting any log and slog output that it produces. If the test fails, we will display the collected log output.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL