After moving some previously working test code to its own
testing-support
module, I'm getting an error:
Unresolved reference: BeforeTest
for
kotlin.test.BeforeTest
during the
:testing-support:compileKotlinJvm
task. I've added
api(kotlin("test"))
to
:testing-support:commonMain
dependencies. The code works for macOS and iOS, but not JVM or Android targets. The IDE doesn't show an error, just during the compile task. Any idea why this doesn't work?
e
ephemient
05/16/2023, 11:01 PM
you need to choose a jvm implementation among kotlin-test-junit kotlin-test-junit5 kotlin-test-testng
j
Jeff Lockhart
05/16/2023, 11:15 PM
Ah, that's right, thanks! I tried adding
junit
itself, but not the
kotlin-test
implementation. This must default to something in the
jvmTest
source set somehow, as I forgot it there before moving to its own module. It's working now after adding