Because the two actions are created in a tight loop, the unique id created to keep track of the effects, being a Date.now(), was not unique - this is sub-millisecond execution. The result is that effect1 does not resolve.
This commit does the following:
Changes the unique tag to a v4 GUID
Adds a test for this scenario
@tannerlinsley I would like your feedback on the test - if you have a different idea for how to instantiate the Redux store so that the test can execute.
Description
Let's say you have two effects:
Effect('effect1', () => { return Actions.effect2() })
Effect('effect2', () => { return Promise.resolve(true) })
And you call them in this manner:
Because the two actions are created in a tight loop, the unique id created to keep track of the effects, being a Date.now(), was not unique - this is sub-millisecond execution. The result is that
effect1
does not resolve.This commit does the following:
@tannerlinsley I would like your feedback on the test - if you have a different idea for how to instantiate the Redux store so that the test can execute.