In my project I have a `testing` module which cont...
# multiplatform
z
In my project I have a
testing
module which contains code to be shared among other modules tests. For some reason though I am getting unresolved reference errors despite having the dependency added. Here is what I have:
Copy code
commonMain {
    dependencies {
        api(libs.kotlin.test)
        api(libs.coroutines.test)
        api(libs.resources.test)
    }
}
And the error:
Unresolved reference 'BeforeTest'.
My code to be shared is in
commonMain
If I understand correctly, this is the only way to share code between tests
f
There is this, might be what you are looking for val commonTest by getting { dependencies { implementation(libs.kotlin.test) implementation(libs.kotlin.coroutines.test) } }
a
This is also a way: commonTest.dependencies { implementation(libs.kotlin.test) implementation(libs.kotlin.coroutines.test) }
z
That doesn't work
a
CommonTest does not support @BeforeTest