kotest-core / io.kotest.core.spec / IsolationMode / InstancePerLeaf

InstancePerLeaf

InstancePerLeaf

A new instance of the Spec class is instantiated for every leaf TestCase. Container test cases are executed only as part of the path to a leaf test.

For example, in the following test plan:

"this test" { println("a") "nested test" { println("b") } "nested test 2" { println("c") } }

The output will be: a b a c