I'm getting Engine exception when trying to run Kotest tests on JVM:
Copy code
LightColorTemperatureViewModelKotest has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
val kotestVersion = "5.1.0"
testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion")
testImplementation("io.kotest:kotest-property:$kotestVersion")
testImplementation("io.kotest.extensions:kotest-extensions-koin:1.1.0")
Lukasz Kalnik
02/22/2022, 9:36 AM
Ok, as the tests didn't work when running from Android Studio "Run test" button, but ran from the command line, the culprit was the default Kotest run configuration template which was configured to use JRE 8 from one of the Android SDKs.
Lukasz Kalnik
02/22/2022, 9:36 AM
I have changed it now to JDK 11 and tests work from Android Studio: