Skip to content
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() do not resets spied getters or setters #1638

Closed
flakekun opened this issue Dec 21, 2017 · 2 comments
Closed

sandbox.resetHistory() do not resets spied getters or setters #1638

flakekun opened this issue Dec 21, 2017 · 2 comments

Comments

@flakekun
Copy link

What did you expect to happen?
Calls that was counted for spied getter through sandbox should have been zeroed after call to sandbox.resetHistory()

What actually happens
called property on getter spy is true after call to sandbox.resetHistory(). You have to manually reset getter calls by implicit call without sandbox.

How to reproduce
https://codepen.io/flakekun/pen/jYroWB?editors=0012

@flakekun
Copy link
Author

Forgot to mention nodejs version, it is 8.9.1

@flakekun flakekun changed the title sanbox.resetHistory() do not resets spied getters or setters sandbox.resetHistory() do not resets spied getters or setters Dec 27, 2017
mroderick added a commit to mroderick/sinon that referenced this issue Jan 26, 2018
@mroderick
Copy link
Member

This has been fixed in sinon@4.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants