testIn

fun TestHostNavigator.testIn(scope: CoroutineScope, timeout: Duration? = null, name: String? = null): NavigatorTurbine

Collects events from TestHostNavigator and returns a NavigatorTurbine for consuming and asserting properties on them in order. If any exception occurs during validation the exception is rethrown from this method.

Unlike test which automatically cancels the flow at the end of the lambda, the returned NavigatorTurbine be explicitly canceled.

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


fun DestinationNavigator.testIn(scope: CoroutineScope, timeout: Duration? = null, name: String? = null): NavigatorTurbine

Collects events from DestinationNavigator and returns a NavigatorTurbine for consuming and asserting properties on them in order. If any exception occurs during validation the exception is rethrown from this method.

Unlike test which automatically cancels the flow at the end of the lambda, the returned NavigatorTurbine be explicitly canceled.

Note: This requires passing TestHostNavigator to DestinationNavigator.

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