
Module with the Main dispatcher had failed to initialize. For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used
原因
Main Threadでの実行が必要なAPIを使用している。
対策
公式の回答がこちら
DispatcherをMainに置き換える
基本的にこちらの方法で問題ありません。ベストプラクティスで...