test

suspend fun TestHostNavigator.test(timeout: Duration? = null, name: String? = null, validate: suspend NavigatorTurbine.() -> Unit)

Collects events from TestHostNavigator and allows the validate lambda to consume and assert properties on them in order. If any exception occurs during validation the exception is rethrown from this method.

timeout - If non-null, overrides the current Turbine timeout inside validate.


suspend fun DestinationNavigator.test(timeout: Duration? = null, name: String? = null, validate: suspend NavigatorTurbine.() -> Unit)

Collects events from DestinationNavigator and allows the validate lambda to consume and assert properties on them in order. If any exception occurs during validation the exception is rethrown from this method.

Note: This requires passing TestHostNavigator to DestinationNavigator.

timeout - If non-null, overrides the current Turbine timeout inside validate.


suspend fun PlatformNavigator.test(timeout: Duration? = null, name: String? = null, validate: suspend NavigatorTurbine.() -> Unit)

Collects platform and back stack events from a navigator created by TestHostNavigator.platformNavigator. The validate lambda consumes and asserts events in order.

timeout - If non-null, overrides the current Turbine timeout inside validate.