Hello. I’m comparing Kotlin MPP to React in terms of testing. While Mockito, Robolectric, Espresso, Hamcrest and Google truth are available for use in Android world, are there any frameworks supporting similar features that can be used to test common code?
04/25/2020, 7:09 AM
we are using assertk
mocking is hard in mpp. mockk exists but i think they still have miserable support for js (because js supports basically no form of reflection)
04/25/2020, 8:47 AM
first of all, please investigate the default/native platform solution for unit test (the kotlin.test framework: https://kotlinlang.org/api/latest/kotlin.test/), and try to understand the best way to use it and where to concentrate your unit tests. In my case, I prefer to make the majority of my business logic in the common module (plain kotlin source folder), and I use the mockk-common on my unit tests....