ThunkTester

class ThunkTester<State>(val thunk: Thunk<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 ThunkTestScope.unverified actions.

Constructors

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

Functions

Link copied to clipboard
inline fun test(strict: Boolean = this.strict, block: ThunkTestScope<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