Christian Nedregaard
03/28/2020, 10:09 PMkotest-runner-junit5-jvm
. When I run this spec
class TestSpec : WordSpec({
beforeTest {
println("beforeTest called for '${it.name}' of type: ${it.type}")
}
"when container" When {
"should container" should {
"the tests" {
println("testing")
}
}
}
})
...I get the following output:
beforeTest called for 'when container when' of type: Container
beforeTest called for 'should container should' of type: Container
beforeTest called for 'the tests' of type: Test
testing
I would have expected beforeTest
to be called only once for the test and not for the containers.
Is this a bug or is my expectation wrong? :)