-
-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sandbox.resetHistory() doesn't reset history of spies #1372
Comments
Hi @Flarna, thanks for your issue! You're using the wrong method to reset spies' history. You should use According to the docs:
Since you want to restore spies and not stubs you should use:
This happens because Let me know if you have any further doubts, otherwise we can wait for a maintainer to close this issue if they believe it's solved. |
If I use |
I just ran into this issue today and would agree with @Flarna. I expected sandbox.resetHistory() to also reset the history of the spies. It seems like overkill to need to use sandbox.reset() and then have to rebuild the behavior of all my stubs. |
The fix has been released as |
What did you expect to happen?
sandbox.resetHistory()
should reset history of spies.What actually happens
sandbox.resetHistory()
is not reseting history of spies.How to reproduce
The text was updated successfully, but these errors were encountered: