Package-level declarations
Types
Link copied to clipboard
class MiddlewareTester<State>(val middleware: Middleware<State>, val initialState: State, val initialClosure: DispatchClosure = EmptyDispatchClosure, val strict: Boolean = true)
Creates a test environment for a middleware with initialState and initialClosure. If strict is true, every test call must process all MiddlewareTestScope.unverified actions.
Link copied to clipboard
The scope for a middleware under test.
Functions
Link copied to clipboard
fun <State> MiddlewareTestScope(middleware: Middleware<State>, initialState: State, initialClosure: DispatchClosure = EmptyDispatchClosure, initialOnDispatch: MutableDispatchScope<State>.(Action) -> Unit = { }): MiddlewareTestScope<State>
Creates a MiddlewareTestScope for a middleware with initialState, initialClosure and initialOnDispatch.
Link copied to clipboard
Calls MiddlewareTestScope.testAction for every action from actions.
Link copied to clipboard
fun <State> Middleware<State>.tester(initialState: State, initialClosure: DispatchClosure = EmptyDispatchClosure, strict: Boolean = true): MiddlewareTester<State>
Creates a MiddlewareTester for this middleware with initialState, initialClosure and strict.
Link copied to clipboard
Calls middleware under test with given action and joins foreground job.
Link copied to clipboard