viewModelScope is using Dispatcher.Main as far as I recall, so in testing you can just call Dispatchers.setMain with TestCoroutineDispatcher ...
確定! 回上一頁