I am trying to write tests in the shared module of a KMM project. In the shared module's build.gradle.kts file I have the following:
sourceSets {
val commonMain by getting
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
//TODO: Hamcrest
//implementation("junit:junit:4.12")
//implementation("org.hamcrest:hamcrest-library:1.3")
//TODO: Mockk
//implementation("io.mockk:mockk:1.10.4")
}
}
//...
}
I have also tried:
implementation(kotlin("[library]"))
with the same result: The tests are no longer recognised by the IDE and I cannot run them.