Vsevolod Kaganovych
08/19/2022, 2:49 PMMutableSharedFlow
which uses debounce?
Example: I’m using this flow to track the input text in textfield, debounce and distinct it, and if it passes I make some calculations.
But if in unit test I emit the value, it never enters the collectLatest {}
lambda.mkrussel
08/19/2022, 2:55 PMTestCoroutineScheduler
that supports fake time, and I would recommend using the library Turbine to make it easier.
Basically advance time and then see if something is emitted.Vsevolod Kaganovych
08/19/2022, 3:20 PMTestCoroutineScheduler
. Also, I don’t have the direct access to the flow reference, it just listens to the stream and when it collects, I do the next steps.advanceUntilIdle
, but it doesn’t help as well