Kotlin Multiplatform: How to mock objects in a unit test for iOS
问题 I'm working on a Kotlin-multiplatform (KMP) library for iOS / Android. I have written some unit tests for JVM, for which I use MockK to create spies and mocks, but MockK doesn't support Kotlin native fully yet. Therefore, I was wondering how others working on KMP projects write unit tests for the iOS platform. An example would be really appreciated. 回答1: Currently, MockK does not support Kotlin/Native or Kotlin/JS. However, both are placed as important items on the project backlog: Kotlin