When testing suspend functions, does anyone have a...
# coroutines
m
When testing suspend functions, does anyone have advice on whether to use
runBlockingTest
vs
runBlocking
?
runBlockingTest
seems to have some nice features, but this line in the documentation makes it sound like there is some risk of deprecation
Copy code
This API is experimental and it is may change before migrating out of experimental (while it is marked as @ExperimentalCoroutinesApi). Changes during experimental may have deprecation applied when possible, but it is not advised to use the API in stable code before it leaves experimental due to possible breaking changes.
g
It's not a risk of deprecated, it's a risk of possible changes of this api Usually it's completely fine use experimental api for applications and especially tests. Only libraries should be careful (because it may also break compatibility of library if this api will change)
👍🏾 1
m
Got it. Thanks!