Hi, everyone! I met strange issue when trying to r...
# kotlintest
i
Hi, everyone! I met strange issue when trying to run tests in multiplatform project At first i’ve add dependencies in
commonTest
module
Copy code
val commonTest by getting {
            dependencies {
                // shared test code because tests placed in features
                implementation(project(":lib:shared-test"))

                // kotlin deps
                implementation(kotlin("test-common"))
                implementation(kotlin("test-annotations-common"))
                
                // ktor test dep to mock responses
                implementation(Dependencies.Ktor.testing)
            }
        }
then i’ve add simple test
Copy code
import kotlin.test.Test
import kotlin.test.assertEquals

class TestCase {

    @Test
    fun test() {
        assertEquals(3, 1 + 2)
    }
}
But when I try run it i am getting
Copy code
e: TestCase.kt: (3, 20): Unresolved reference: Test
e: TestCase.kt: (4, 20): Unresolved reference: assertEquals
e: TestCase.kt: (16, 6): Unresolved reference: Test
e: TestCase.kt: (18, 9): Unresolved reference: assertEquals
and message
test events were not received
Why can it be?
test code placed in
commonTest
folder
Compiler doesn’t show any errors with imports
s
This room was for kotest previously known as kotlintest. For kotlin.test you would be better off asking in #test