https://kotlinlang.org logo
#kotest
Title
# kotest
m

Mykola Gurov

02/23/2022, 4:49 PM
A noob question. FunTest nested. Is there any functional difference between
context
and
test
except for
test
doesn’t support nesting?
in other words, is there any reason to use
test
at all in highly-volatile nested tests? so far I think I can just stick to
context
and don’t have to think of whether I’m in a leaf or not
s

sam

02/23/2022, 5:15 PM
there are some times you might care about the differnece, like
beforeEach
callbacks and things like that
but generally if your needs are simple, not much difference
m

Mykola Gurov

02/23/2022, 7:06 PM
ah, thanks for pointing out the lifecycle events. They do behave differently indeed - and in the direction from what I would’ve expected, but not a show stopper for my case
3 Views