Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PanicTB ¶
func PanicTB() *panicTB
PanicTB is an implementation for testing.TB that panics when an error is logged or FailNow is called. This is useful to inject into test helpers in example tests where no *testing.T is available.
Doesn't fully implement testing.TB. Functions where it's used should take the more streamlined TestingTB instead.
Types ¶
type MockT ¶ added in v0.22.0
type MockT struct {
Failed bool
// contains filtered or unexported fields
}
MockT mocks TestingTB. It's used to let us verify our test helpers.
type TestingTB ¶
type TestingTB interface {
Errorf(format string, args ...any)
FailNow()
Helper()
Log(args ...any)
Logf(format string, args ...any)
Name() string
}
TestingT is an interface wrapper around *testing.T that's implemented by all of *testing.T, *testing.F, and *testing.B.
It's used internally to verify that River's test assertions are working as expected.
Click to show internal directories.
Click to hide internal directories.