Documentation ¶
Index ¶
- func AssertEvents(t *testing.T, actualCh any, expected ...any) bool
- func AssertForefrontEvents(t *testing.T, actualCh any, expected ...any) bool
- func Context(t *testing.T) context.Context
- func ContextWithTimeout(t *testing.T, timeout time.Duration) context.Context
- func Group(t *testing.T) *parallel.Group
- func GroupWithTimeout(t *testing.T, timeout time.Duration) *parallel.Group
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEvents ¶
AssertEvents asserts that the expected list of events was received on the actual channel and no unexpected events are enqueued there
func AssertForefrontEvents ¶
AssertForefrontEvents asserts that the expected list of events was received on the actual channel
func Context ¶
Context returns a new testing context.
If your code relies on the values normally injected into the context by Tool or server, it's a good idea to test it with TestContext to provide adequate replacements.
func ContextWithTimeout ¶
ContextWithTimeout is a version of TestContext with a timeout.
If the timeout expires, the test context is closed with context.DeadlineExceeded.
func Group ¶
Group returns a parallel.Group with a testing context.
If your code relies on the values normally injected into the context by Tool or Server, it's a good idea to test it with TestGroup to provide adequate replacements.
If the group finishes with an error other than context.Canceled, the test is failed.
Types ¶
This section is empty.