Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InitNoopLogger = func(name string, vs ...interface{}) (log.Logger, error) { return &noopLogger{}, nil }
InitNoopLogger is a init function to initialize a noop logger.
Functions ¶
func AssertGolden ¶
AssertGolden compares what's got and what's in the golden file. It updates the golden file on-demand. It does nothing when the runtime is "windows".
func Exec ¶
Exec executes "go test" on given helper with supplied environment variables. It is useful to mock "os/exec" functions in tests. When succeeded, it returns the result produced by the test helper. The test helper should:
- Use WantHelperProcess function to determine if it is being called in helper mode.
- Call fmt.Fprintln(os.Stdout, ...) to print results for the main test to collect.
func WantHelperProcess ¶
func WantHelperProcess() bool
WantHelperProcess returns true if current process is in helper mode.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.