Has anyone encountered any issues with Spek2 and k...
# spek
s
Has anyone encountered any issues with Spek2 and kotlin multiplatform project? Spek2 can't seem to find any of my tests when I use the
src > commonMain, commonTest, jvmMain, jvmTest
format (I'm only trying to run the tests with jvmTest source set)
t
there is multiplatform sample available: https://github.com/spekframework/spek/blob/2.x/samples/multiplatform/build.gradle Check if your setup is the same
s
Hmm thank you. I thought maybe I was doing something wrong with commonTest but after adding the metadata dependency I'm still getting the error
WARNING: TestEngine with ID 'spek2' failed to discover tests
. I was getting this in spek 2.0.0 in my other, non-mp project, but it was fixed in 2.0.1. Not sure what is causing it now with a mp project ­čś×
Copy code
named<Test>("jvmTest") {
        outputs.upToDateWhen { false }
        useJUnitPlatform {
            includeEngines("spek2")
        }

        maxHeapSize = "1g"
        finalizedBy(jacocoReport)
    }
this is what my test task config looks like