Hello. So I'm trying to test a `snapshotFlow { mut...
# coroutines
w
Hello. So I'm trying to test a
snapshotFlow { mutableState }
, but no matter how much I update the
mutableState
, it only takes one value and i'm not sure why. It seems like the test finishes without waiting for all the values to be collected since updating that
mutableState
is not structured concurrency? if that is the case how can I test it? or what is the deal with this one?
d
Ask in #compose
z
If you don’t use the compose ui runtime, or another runtime like Molecule, then nothing is bootstrapping the snapshot system’s observation mechanism. For simple cases a basic
Snapshot.registerGlobalWriteObserver { Snapshot.sendApplyNotifications() }
should work.