expectInternalStateOn

inline suspend fun <LAST_STATE : INTERNAL_STATE> expectInternalStateOn(expectedChange: LAST_STATE.() -> INTERNAL_STATE)(source)

Awaits for an internal state and checks if it matches the expected internal state change from the previous internal state, ensuring the last internal state is of the expected type.

Parameters

expectedChange

The expected change from the previous internal state.

Throws

if internal state does not match the expected change.