README
Go Test Yourself
A collection of packages compatible with go test
to support common testing
patterns.
Packages
- assert - compare values and fail the test when the comparison fails
- env - test code that uses environment variables
- fs - create test files and directories
- golden - compare large multi-line strings
- icmd - execute binaries and test the output
- poll - test asynchronous code by polling until a desired state is reached
- skip - skip tests based on conditions
- testsum -
a program to summarize
go test
output and test failures
Related
- maxbrunsfeld/counterfeiter - generate fakes for interfaces
- jonboulle/clockwork - a fake clock for testing code that uses
time
Documentation
There is no documentation for this package.
Directories
Path | Synopsis |
---|---|
Package assert provides assertions for comparing expected values to actual values.
|
Package assert provides assertions for comparing expected values to actual values. |
cmp
Package cmp provides Comparisons for Assert and Check
|
Package cmp provides Comparisons for Assert and Check |
Package env provides functions to test code that read environment variables or the current working directory.
|
Package env provides functions to test code that read environment variables or the current working directory. |
Package fs provides tools for creating and working with temporary files and directories.
|
Package fs provides tools for creating and working with temporary files and directories. |
Package golden provides tools for comparing large mutli-line strings.
|
Package golden provides tools for comparing large mutli-line strings. |
gotestsum
module
|
|
Package icmd executes binaries and provides convenient assertions for testing the results.
|
Package icmd executes binaries and provides convenient assertions for testing the results. |
Package poll provides tools for testing asynchronous code.
|
Package poll provides tools for testing asynchronous code. |
Package skip provides functions for skipping based on a condition.
|
Package skip provides functions for skipping based on a condition. |
Package testsum provides functions for parsing `go test -v` output and returning a summary of the test run.
|
Package testsum provides functions for parsing `go test -v` output and returning a summary of the test run. |
internal
|
|