test

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module(t TB) fx.Option

Module provides an Fx module that can be used to test Sprout applications. This will enable logging, tracing and metrics.

Example:

app := fxtest.New(
	t,
	test.Module(testingT), // use testing.T or testing.B
	otherModules,
)
app.RequireStart()

Types

type TB

type TB interface {
	Logf(string, ...interface{})
	Errorf(string, ...interface{})
	Fail()
	Failed() bool
	Name() string
	FailNow()
}

TB is the interface that testing.T and testing.B implement.

Jump to

Keyboard shortcuts

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