Oleksii Malovanyi
07/02/2021, 10:54 AMrunOnCreate
in tests -> it blocks, so if you have a delay or withTimeout call right when the container is created, your test would still be live timed 😞
https://github.com/orbit-mvi/orbit-mvi/pull/53Oleksii Malovanyi
07/02/2021, 2:18 PMtest()
to be a suspending function –> that’s breaking, but I guess as testIntent
is suspending too, anyway, it doesn’t matter much ¯\_(ツ)_/¯Mikolaj Leszczynski
07/04/2021, 8:43 PMrunOnCreate
might be a bit hidden inside the test
function anyway.
How about moving it out into its own separate (suspending in suspending test mode, blocking in live test mode) function in TestContainerHost
instead?Mikolaj Leszczynski
07/04/2021, 8:46 PMonCreate
lambda is not suspending, I suppose the only reason for it to be suspending is so it can run any fired off intents so it’s a bit of a weird oneOleksii Malovanyi
07/05/2021, 11:12 AMrunOnCreate
with it’s own function, so it could look like
createViewModel()
.testOnCreate() // <-- ¯\_(ツ)_/¯
.testIntent { onFilterClick() }
.assert(initialState) {
postedSideEffects(OffersEffect.NavigateToFilters)
}
Mikolaj Leszczynski
07/05/2021, 11:16 AMMikolaj Leszczynski
07/05/2021, 11:16 AMtest
Mikolaj Leszczynski
07/05/2021, 11:16 AMOleksii Malovanyi
07/05/2021, 11:17 AMOleksii Malovanyi
07/05/2021, 11:18 AMtestOnCreate
or runOnCreate
🤔Mikolaj Leszczynski
07/05/2021, 11:18 AMMikolaj Leszczynski
07/05/2021, 11:19 AMOleksii Malovanyi
07/05/2021, 11:19 AMOleksii Malovanyi
07/05/2021, 11:28 AMOleksii Malovanyi
07/05/2021, 12:45 PMMikolaj Leszczynski
07/05/2021, 12:52 PMMikolaj Leszczynski
07/06/2021, 8:01 PMOleksii Malovanyi
07/06/2021, 9:04 PMOleksii Malovanyi
07/07/2021, 10:55 AMMikolaj Leszczynski
07/07/2021, 8:16 PMappmattus
07/07/2021, 9:04 PMOleksii Malovanyi
07/08/2021, 11:44 AMOleksii Malovanyi
07/08/2021, 11:45 AMMikolaj Leszczynski
07/08/2021, 11:45 AMMikolaj Leszczynski
07/08/2021, 11:45 AMOleksii Malovanyi
07/08/2021, 11:47 AMOleksii Malovanyi
07/09/2021, 7:21 AM