Hey guys, I'm trying to understand the difference between
test()
and
liveTest()
From what I understand,
liveTest()
creates a real container host whereas
test()
creates a "fake" one.
The
test()
function has an
isolateFlow
boolean, if set to
true
(default value) then it will only test 1 intent. If an intent is fired inside another intent, the 2nd intent won't run.
containerHost.testIntent {
change1()
change2()
}
containerHost.assert(initialState) {
states(
{
copy(...)
},
{
copy(...)
}
)
}
If I run it with
test(isolateFlow = true)
or with
liveTest()
I get the same error "expected states but never received"
But when I run it with
test(isolateFlow = false)
then my test passes
Shouldn't be the opposite? Shouldn't
liveTest()
behave like
test(isolateFlow = false)
?