Christian Nedregaard
03/29/2020, 11:14 AMafterTest {
println("afterTest called for '${it.a.name}'")
}
..i get
beforeTest called for 'when container when' of type: Container
afterTest called for 'when container when'
beforeTest called for 'should container should' of type: Container
beforeTest called for 'the tests' of type: Test
testing
afterTest called for 'the tests'
afterTest called for 'should container should'
So it seems like the When
is completed before (or independently of) its children while the should
is completing its children before completing itself.
Is this an explicit approach or should I just not make to many assumptions regarding the ordering of completions?
2:
Do you have a recommended approach for doing setup/teardown scoped on When
for resources that are to be available for all the Whens children? Not for every When
in the spec but for a single instance.
I'm moving over from Spek 1 where this could be achieved with `beforeGroup`/`afterGroup`.
The only approach I have found so far is to factor these cases out into separate specs.
Leaf isolation mode would not be optimal since it would recreate the resource for each TEST not for each When.
I suspect I need to adjust my expectation as to the contract Kotest offers reg. the relationship between nested containers/tests.sam
03/30/2020, 12:27 AMsam
03/30/2020, 12:27 AMsam
03/30/2020, 12:27 AMsam
03/30/2020, 9:08 PM