expectExternalStateOn

inline suspend fun <LAST_STATE : EXTERNAL_STATE> expectExternalStateOn(expectedChange: LAST_STATE.() -> EXTERNAL_STATE)(source)

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

Parameters

expectedChange

The expected change from the previous external state.

Throws

if external state does not match the expected change.