Well no. i don;t want to add any transitive dependencies. also "it doesn't" make much sense" is not a good reason to forbid it
r
russhwolf
07/04/2019, 4:09 PM
It’s possible to share test code between modules by created a separate
sharedTests
module that defines your tests in
commonMain
, and then depending on
:sharedTests
from the test code of other modules. There’s some rough edges though. For example if you try this in JS on 1.3.40 you’ll very likely run into https://youtrack.jetbrains.com/issue/KT-31917
russhwolf
07/04/2019, 4:11 PM
I had a configuration like that in Multiplatform Settings, but removed it in the 1.3.40 update due to that and another similar issue on native. Currently I share test code via
kotlin.srcDirs()
but the IDE complains when files are duplicated across multiple sourceSets/modules in that way.
t
thana
07/05/2019, 4:37 AM
Thank you!
I wonder why sharing code in tests is so hard...