Unit Test Firestore CallbackFlow
I wrote the following code to test Firestore data reading with coroutines' runTest function:
@Test
fun `callbackFlow should read trip`() =
runTest {
log("test started")
var result: DocumentSnapshot? = null
val flow = callbackFlow {
log("callbackFlow started")
val listener = firestore
.collection("/collection")
.addSnapshotListener { snapshot, e ->
e?.let {...