icerockdev / moko-mvvm

Model-View-ViewModel architecture components for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
995 stars 95 forks source link

Provide ability to change viewModelScope dispather for multiplatform tests #113

Closed Alex009 closed 3 years ago

Alex009 commented 3 years ago

In android we can use https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-test/kotlinx.coroutines.test/-test-coroutine-dispatcher/ with https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-test/kotlinx.coroutines.test/kotlinx.coroutines.-dispatchers/set-main.html for unit tests of ViewModel, but on ios it not available, so we should provide own way to set test dispatcher