presenterTestOf

suspend fun <UiState : CircuitUiState> presenterTestOf(presentFunction: @Composable () -> UiState, timeout: Duration? = null, name: String? = null, policy: SnapshotMutationPolicy<UiState> = structuralEqualityPolicy(), block: suspend CircuitReceiveTurbine<UiState>.() -> Unit)(source)

Presents this presentFunction and invokes a suspend CircuitReceiveTurbine that can be used to assert state emissions from it.

Parameters

presentFunction

the Composable present function being tested.

timeout

an optional timeout for the test. Defaults to 1 second (in Turbine) if undefined.

policy

a policy to controls how state changes are compared in CircuitReceiveTurbine.awaitItem.

block

the block to invoke.

See also

moleculeFlow
test