Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HijackStandardStreams ¶ added in v0.8.0
func NewAlwaysErrFS ¶ added in v0.8.0
NewAlwaysErrFS creates an fs.FS that always fail at Open() call with provided err
if err is nil, fs.ErrInvalid is returned by default
func NewAlwaysFailReader ¶ added in v0.8.0
NewAlwaysFailReader creates an reader already fail on Read() call with provided err
if err is nil, an io.ErrUnexpectedEOF is returned by default
func TestFixtures ¶
func TestFixtures[TestCase, Expected any]( t *testing.T, dir string, createTestSpec func() TestCase, createExpected func() Expected, check func(t *testing.T, spec TestCase, exp Expected), )
TestFixtures run tests using multi-doc yaml file
# first doc is the test spec some_args: ... spec:
a: b
--- # second doc is the expected result c: d
Types ¶
type AlwaysErrFS ¶ added in v0.10.1
type AlwaysErrFS struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.