Hey guys, using Orbit's testing framework, how can I test this?
containerHost.assert( initialState ) {
states({ dataFromCache }) // first state
refreshCache() // update cache
states({ updatedDataFromCache }). // updated state emitted AFTER cache update
}
For some reason the 1st option fails fails, but if I run the following it passes:
refreshCache()
containerHost.assert( initialState ) {
states({ dataFromCache }, { updatedDataFromCache })
}
However, the 2nd option doesn't guarantee that the second state was only emitted after the
refreshCache()
function was called. It feels like there's no way to assert the timing at which new states are emitted using the
states
function.
Any idea?