kotest-android icon indicating copy to clipboard operation
kotest-android copied to clipboard

How to use these extensions with Kotlin Multiplatform?

Open Burtan opened this issue 11 months ago • 2 comments

Hey,

did you try to use these kotest extensions with Kotlin Multiplatform? Ideally the tests are written in the commonTest module. But there are some problems. For example you cannot use @Roboelectric in commonTest because it is only available in the Android module.

Burtan avatar Jan 06 '25 14:01 Burtan

I believe it's possible, yes, but I've never done it.

As you've asked around in Robolectric too, https://github.com/robolectric/robolectric/issues/7942 , what is new at the moment? I see that your issue was closed as completed

LeoColman avatar Jan 06 '25 16:01 LeoColman

Yes, using subclassing I managed to run Roboelectric tests in commonTest using kotlin-test. However I did not succeed in kotest. I will try using these extensions and give an update on this topic :-).

Burtan avatar Jan 06 '25 16:01 Burtan