Is there a guide how to test in memory room databa...
# coroutines
c
Is there a guide how to test in memory room database with coroutines especially using new test coroutine api added in kotlin 1.6 ?
y
Not sure about a guide, but it's generally seemed to work well. https://github.com/yschimke/rememberwear/blob/main/wear/src/androidTest/kotlin/com/google/wear/soyted/db/RememberWearDatabaseTest.kt Apart from runTest{} and creating it, do you need to test other specific cases?
c
I want to test a flow query that emits data as I do operations on db basic e.g. ( test empty list, insert 2, test 2 items list)
g
For flow you can use turbine, kotlinx.coroutines do not have test utils for flow https://github.com/cashapp/turbine