Benoît
03/14/2022, 2:58 PMtest()
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)
?Mikolaj Leszczynski
03/14/2022, 3:12 PMMikolaj Leszczynski
03/14/2022, 3:12 PMMikolaj Leszczynski
03/14/2022, 3:13 PMBenoît
03/14/2022, 4:07 PMtest()
just for this one 😅 But thanks for the info, that's useful