CoThunkTester

class CoThunkTester<State>(val thunk: CoThunk<State>, val initialState: State, val initialClosure: DispatchClosure = EmptyDispatchClosure, val strict: Boolean = true)

Creates a test environment for a thunk with initialState and initialClosure. If strict is true, every test call must process all CoThunkTestScope.unverified actions.

Constructors

Link copied to clipboard
fun <State> CoThunkTester(thunk: CoThunk<State>, initialState: State, initialClosure: DispatchClosure = EmptyDispatchClosure, strict: Boolean = true)

Functions

Link copied to clipboard
inline fun test(strict: Boolean = this.strict, block: CoThunkTestScope<State>.() -> Unit)

Runs a thunk test from a block.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val strict: Boolean = true
Link copied to clipboard