alex.krupa
10/13/2022, 9:21 AMAbstractProjectConfig
to work. According to the docs, Kotest should automatically find these classes on the classpath and apply their configs to specs. Are there any undocumented requirements for this to work?
For example, should this test case pass?
object KotestConfig : AbstractProjectConfig() {
override val isolationMode = IsolationMode.InstancePerLeaf
}
class KotestConfigSpec : StringSpec({
"uses leaf isolation mode" {
assertEquals(IsolationMode.InstancePerLeaf, isolationMode())
}
})
alex.krupa
10/13/2022, 9:22 AMio.kotest:kotest-runner-junit5-jvm
)
• No custom kotest.properties
christophsturm
10/13/2022, 9:32 AMalex.krupa
10/13/2022, 9:48 AMalex.krupa
10/13/2022, 9:48 AMReturns theSo, if I understand correctly, it'd return null no matter what, unless I set it explicitly in a spec.to be used by the test engine when running tests in this spec. If null, then the project default is used.IsolationMode
sam
10/13/2022, 11:59 AMalex.krupa
10/14/2022, 4:00 PMprivate fun Spec.resolvedIsolationMode() =
this.isolationMode() ?: this.isolationMode ?: configuration.isolationMode
Spec.isolationMode
field is not set within the framework, it's only a configuration value that's resolved later on by the delegate.