-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
stub.resetBehavior() missing in documentation #267
Comments
There is still work being done regarding The same goes for |
@mantoni How can I override previous |
Could you send a more detailed description of what you are trying to do to the mailing list? |
@mantoni The problem of |
Is it? To be honest, I don't really know. Maybe it could be added to the documentation now, but I'm unsure whether it should really become an "official" part of the API. The ideas developed in the mentioned issue might lead to the function being obsolete - if we ever find the time to finally work on it. |
I don't think it should be documented as it won't be needed in the future. |
I still find Consider this code var stub = sinon.stub();
stub.withArgs(1).returns('Bye'); How would you reset this stub to always return 'Hello' for example. var stub = sinon.stub();
stub.withArgs(1).returns('Bye');
stub.resetBehavior();
stub.returns('Hello');
// stub(1) now returns 'Hello', i.e. old stubbings are reset Generally it makes a lot of sense to be able to reset all behavior-related changes on a stub. |
Please don't revive issues that have been closed for years. We are trying to keep the GitHub issues list tidy and focused on bugs and feature discussions. If you have usage questions, please post them to the Sinon.JS mailinglist, so the bigger community can help answer your questions. If you believe that you've found a bug in Sinon.JS, please open a brand new ticket and follow the guidelines for reporting an issue. |
sinon 1.6.0
Method
stub.resetBehavior()
looks like public but it missing in documentation.What difference between
stub.yields()
andstub.thenYields()
?The text was updated successfully, but these errors were encountered: