https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
b

bod

09/13/2020, 1:57 PM
Hello, World! Trying to create a MPP library with 1.4.10, I get
Unresolved reference assertEquals
in my unit tests. I have these dependencies:
Copy code
commonTest {
            dependencies {
                implementation(kotlin("test-common"))
                implementation(kotlin("test-annotations-common"))
            }
        }
Googling a bit it looks like I'm not the only one [1] - but I'm a bit surprised, this seems like a major problem. So I guess my question is: does anyone have a basic example project, with tests, that works? [1] = https://youtrack.jetbrains.com/issue/KT-40571
nevermind... This fixed it:
Copy code
sourceSets {
        val commonMain by getting {
            dependencies {
                implementation(kotlin("stdlib"))
            }
        }
        val commonTest by getting {
            dependencies {
                implementation(kotlin("test-common"))
                implementation(kotlin("test-annotations-common"))
            }
        }

        val jvmTest by getting {
            dependencies {
                implementation(kotlin("test"))
                implementation(kotlin("test-junit"))
            }
        }
    }