Using verifyActionResult
and testNextRender
sequentially results in confusion on external shared states
#860
Labels
verifyActionResult
and testNextRender
sequentially results in confusion on external shared states
#860
Discovered this while pairing with @steve-the-edwards:
Situation:
Using a Mock to verify a number of calls to a dependency of a Workflow
verifyActionResult
will apply theprocessedAction
to the current state and return aRenderTestResult
, but will not apply it to the next renders.testNextRender
will also apply theprocessedAction
to the current state and return aRenderTester
allowing you to continue testing a flow of events in a workflowThe issue comes in when you are doing something like verifying calls against a mock. The action is technically applied twice to the same instance of state (potentially resulting in 2 calls to a mock when you expect 1) if you do a call chain like this:
A solution could be a version of
verifyActionResult
that also returns a RenderTester, so you could avoid the doubly applied actions.The text was updated successfully, but these errors were encountered: