Join Slack
Powered by
Hi everyone. Is it possible to have a unit test in...
# kotlin-native
p
Philip_Touchlab
03/20/2019, 6:41 PM
Hi everyone. Is it possible to have a unit test in commonTest of a library module and run it in iOS test runner?
k
kpgalligan
03/20/2019, 7:24 PM
The ultimate purpose is to be able to give some lambdas from swift to “inject” logic outside of strictly using Objc interop. In the Droidcon app, we call into the common code with some initializer structures, some of which are lambdas, and in the case of iOS, those are swift. There’s no easy way to “test” them in the context of a unit test.
https://github.com/touchlab/DroidconKotlin/blob/master/sessionize/lib/src/commonMain/kotlin/co/touchlab/sessionize/AppContext.kt#L42
kpgalligan
03/21/2019, 4:03 PM
Figured this out …
3
Views
Open in Slack
Previous
Next