So jetbrain's super amazing kmp plugin includes absolutely zero test setup. Include tests so that all developers can be encouraged to write well made code? Jetbrains would rather just give you a ktor server. This means I have to try and set up kotest on my own without a common test. It does not seem to work so I am reaching out for some help. Let me show you what I did
first I added this in the build.gradle in the sourceSets section
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation("io.kotest:kotest-assertions-core:${project.property("kotest-assertions-version")}")
implementation("io.kotest:kotest-framework-engine:${project.property("kotest-assertions-version")}")
}
}
I then created the commonTest directory under the src folder so it looks like the included image. I also created a class called DatabaseTest.
Then I wrote this test
class DatabaseTest : FreeSpec() {
init {
"test" {
0 shouldBe 0
fail("ssp")
}
}
}
Doing ./gradlew test shows successful which means its not running the test.
Running the test through the kotest plugin gives me this error
Cannot locate tasks that match ':composeApp:compileJava' as task 'compileJava' is ambiguous in project ':composeApp'. Candidates are: 'compileDebugAndroidTestJavaWithJavac', 'compileDebugJavaWithJavac', 'compileDebugUnitTestJavaWithJavac', 'compileReleaseJavaWithJavac', 'compileReleaseUnitTestJavaWithJavac'.
Any clue on how to solve this annoyance?