testutils

package
v0.95.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogCtx

func LogCtx(t testing.TB) context.Context

LogCtx returns a new background context.Context carrying a *slog.Logger wired to t.Log(). Useful to associate all logs with the test case that caused them.

func TestLogger

func TestLogger(t testing.TB) *slog.Logger

TestLogger is an adapter that sends output to t.Log so that log messages are associated with failing tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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