Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Tester: Add ability to clear actions, but keep state intact #2

Closed
joelwilliamsmith opened this issue Oct 20, 2017 · 0 comments
Closed

Comments

@joelwilliamsmith
Copy link
Contributor

It would be useful to be able to reset tester actions, but keep the state intact. This could be an additional flag on the reset function (defaults to true to keep the current API consistent).

e.g.

tester.dispatch({ type: SET_AMOUNT, amount: 100 });

tester.getCalledActions().length; // 1;
tester.getState(); // { amount: 100 }

tester.reset(true, false);

tester.getCalledActions().length; // 0;
tester.getState(); // { amount: 100 }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant