…ine. When I started using coroutines, I thought that testing them was gonna be a little though, but an easy and functional way to test a coroutine or a suspend function is using the runBlocking function. That is all, this will block the main thread to run all the work there, so the saving process run …
Also, both appear to make the method run synchronously, whereas the MainCoroutineRule pauses and resumes the coroutine to control the flow.
runBlocking the code runs synchronously by default, whereas with MainCoroutineRule, it runs synchronously with manual control. 🤔