Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Coil unit testing - how to do this?

Is it possible to mock coil network level when unit testing? With MockWebServer? Or test it somehow else? I can't find information on the Internet about it.

like image 659
Владимир Фишер Avatar asked Oct 14 '25 15:10

Владимир Фишер


1 Answers

I've found the answer. We can use OkHttp’s mock web server. Also check out: https://coil-kt.github.io/coil/image_loaders/#testing

like image 112
Владимир Фишер Avatar answered Oct 17 '25 04:10

Владимир Фишер



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!