Flow Test Scope
interface FlowTestScope
This scope provides a helper startCollecting method for easier testing of Kotlin Flows.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun <T> executeInBackground(context: CoroutineContext = UnconfinedTestDispatcher(scope.testScheduler), command: suspend () -> T): BackgroundCoroutineState<T>
Execute a command in the backgroundScope.
Link copied to clipboard
Link copied to clipboard
abstract fun <T> Flow<T>.startCollecting(context: CoroutineContext = UnconfinedTestDispatcher(scope.testScheduler)): TestFlowCollector<T>
Start collecting this flow.