I am in a multiplatform project with Kotest and it...
# kotest
v
I am in a multiplatform project with Kotest and it cannot find withData(), I am using a free spec. Any idea why?
e
Did you add a dependency in
io.kotest:Kotest-framework-datatest
?
v
uhhh... I got like this....
e
Looks like you don’t. As mentioned here, a separate dependency is needed. https://kotest.io/docs/framework/datatesting/data-driven-testing.html
v
right, so I did that now and it is still not working
Copy code
val commonTest by getting {
            dependencies {
                implementation(libs.kotest.framework.engine)
                implementation(libs.kotest.assertions.core)
                implementation(libs.kotest.framework.datatest)

            }
        }
this is my new import
Copy code
kotest-framework-engine = { module = "io.kotest:kotest-framework-engine", version.ref = "kotest" }
kotest-assertions-core = { module = "io.kotest:kotest-assertions-core", version.ref = "kotest" }
kotest-framework-datatest = { module= "io.kotest:Kotest-framework-datatest", version.ref = "kotest" }
kotest-runner-junit5-jvm = { module = "io.kotest:kotest-runner-junit5-jvm", version.ref = "kotest" }
this is the TOML
e
Did you reload gradle config in IntelliJ?
v
yeah that got the error to show up. I copy pasted a capital K but gradle was still building fine, I clicked on the elephant but I think it may have glitched and I did not notice. Adding the dependancy was the solution here. Thank you so much
e
sorry about the capitalization, was on my phone 🙂 no problem!