Documentation ¶
Overview ¶
Package runner executes test.Test values under Go's native test framework and other test frameworks with a similar interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlessStrategy ¶ added in v0.2.4
type BlessStrategy int
BlessStrategy is a strategy for accepting failed test output as the new expectation, known as "blessing" the output.
const ( // BlessAvailable is a [BlessStrategy] that instructs the user that blessing // may be activated by using the -aureus.bless flag on the command line. BlessAvailable BlessStrategy = iota // BlessEnabled is a [BlessStrategy] that explicitly enables blessing of // failed tests. BlessEnabled // BlessDisabled is a [BlessStrategy] that explicitly disables blessing of // failed tests. BlessDisabled )
type FailerT ¶ added in v0.2.6
FailerT is the subset of the testing.TB that supports logging and failure reporting.
type Input ¶ added in v0.2.0
type Input interface { io.Reader // Language returns the language of the input value, if known, e.g. "json", // "yaml", etc. Language() string // Attributes returns a set of key-value pairs that provide additional // loader-specific information about the input. Attributes() map[string]string }
Input is an interface for the input to a test.
type LoggerT ¶ added in v0.2.4
LoggerT is the subset of the testing.TB that supports logging only.
type Output ¶ added in v0.2.0
type Output interface { io.Writer // Language returns the expected language of the output value, if known, // e.g. "json", "yaml", etc. Language() string // Attributes returns a set of key-value pairs that provide additional // loader-specific information about the expected output. Attributes() map[string]string }
Output is an interface for producing the output for a test.
type OutputGenerator ¶
OutputGenerator produces the output of a specific test.
type Runner ¶
type Runner[T TestingT[T]] struct { GenerateOutput OutputGenerator[T] TrimSpace bool // TODO: make this a loader concern BlessStrategy BlessStrategy AssertionFilter func(test.Assertion) bool PackagePath string }
Runner executes tests under any test framework with an interface similar to Go's native *testing.T.