Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(NewTestHooks), )
Functions ¶
func Call ¶
Call calls a func() hook if present.
TestHooks should be used very sparingly, see comment on TestHooks.
Types ¶
type TestHooks ¶
type TestHooks struct{}
TestHooks (in production mode) is an empty struct just so the build works. See TestHooks in test_impl.go.
TestHooks are an inherently unclean way of writing tests. They require mixing test-only concerns into production code. In general you should prefer other ways of writing tests wherever possible, and only use TestHooks sparingly, as a last resort.
func NewTestHooks ¶ added in v1.30.0
func NewTestHooks() TestHooks
Click to show internal directories.
Click to hide internal directories.