What are the recommendations on testing flows? Wit...
# squarelibraries
p
What are the recommendations on testing flows? With runTest I always run into a TimeoutCancellationException. For example a very simple reproducer:
Copy code
@Test
  fun myTest() = runTest {
    flow {
      delay(10.milliseconds)
      emit(Unit)
    }.test {
      awaitItem() shouldBe Unit
    }
  }
j
If you use runBlocking, is it still happening?
p
Nope
j
Sadly I saw this issue with runBlockingTest being fixed by runBlocking
I had the hope it was fixed with 1.6.0…
p
Yep that’s why I’m here 😛