I have a gradle module that is kotlin multiplatfor...
# multiplatform
c
I have a gradle module that is kotlin multiplatform. It's a pretty small networking library, but now I want to write some tests for it. It seems like my IDE (android studio) runs tests just fine in /src/test and /src/commonTest. Should I prefer one over the other?
m
I wasn’t expecting
test
to work, I’d do
commonTest
always
Are you running your tests with the Gradle runner?
c
not sure actually. i just hit the little green arrow next to my test class in Studio. 🙈
m
It’s here
I always use Gradle. IDEA can behave surprinsigly otherwise
c
hm. yep. thats what i have set
c
src/test is the directory detected by the Android Gradle plugin, while src/commonTest is the one used by KMP. You can see that the tests in src/test only run Android local unit tests.