Actually I’m curious, what’s the use case for `Ins...
# kotest
w
Actually I’m curious, what’s the use case for
InstancePerTest
isolation mode? The way we’re using kotest right now is with
DescribeSpec
, so we have bunch of
describe
and
context
blocks which set up tests for the
it
blocks which contain the assertions. Iiuc,
InstancePerLeaf
will create new instance of the test for each
it
block, and execute everything that leads to it.
InstancePerTest
would create new instance not only for
it
block, but also for
describe
and
context
, is that correct?
Is
InstancePerTest
useful for some other spec type, or would I sometimes want to execute code up to
describe
for example, without any `it`s?
s
It’s for people who have code in each level. It’s not as useful or common as InstancePerLeaf
👍 1