Closed zakhenry closed 1 year ago
@zakhenry the Gradle configuration will only take effect when tests are invoked using Gradle.
When running an individual test, Kotest IntelliJ plugin will not invoke the test with Gradle, so the --add-opens
is not applied.
Once https://github.com/kotest/kotest-intellij-plugin/issues/178 is fixed, you could configure IntelliJ to run tests with Gradle and this would work for individual tests as well.
Have you thought about using the kotest.properties setting ?
On Fri, 21 Apr 2023 at 17:23, Emil Kantis @.***> wrote:
@zakhenry https://github.com/zakhenry the Gradle configuration will only take effect when tests are invoked using Gradle.
When running an individual test, Kotest IntelliJ plugin will not invoke the test with Gradle, so the --add-opens is not applied.
— Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/250#issuecomment-1518388871, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGWSTLVWXWC7K55IXJTXCMCHPANCNFSM6AAAAAAXALPV64 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Ah yes this is a good solution thanks, doc ref for future reference: https://kotest.io/docs/intellij/intellij-properties.html
'withEnvironment' still doesn't work in kotest 5.5.5. I've opened the issue https://github.com/kotest/kotest/issues/4036
Could someone add an example what we need to put into kotest.properties
to get withEnvironment {}
working?
for example with the following spec file:
if I play the line
1
the test passes, however if I play2
or3
the test fails withKotest
5.5.2
and plugin version1.3.68-IC-2023.1
. I do have the following lines in build.gradle.kts