-
-
Notifications
You must be signed in to change notification settings - Fork 770
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
Mock throws exception when called twice #2046
Comments
Not sure why anonymous mocks differ from the ones on objects, but adding |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This looks like it need a bit more investigation |
For anonymous mocks, |
I think this should be closed or changed to update the docs. I guess it's not stated explicitly. Also, we talked about removing mocks for Sinon 2 and splitting it out into a separate side-project, seeing that none of the maintainers care about them or use them, and seeing we really don't know enough about how they work these days, maybe it's time to revisit that idea 😄 |
Description
Mock throws
ExpectationError: Anonymous mock already called once
when called twice, even with two preprogrammed returns()/resolves().To Reproduce
Expected behavior
Mock should be able to be reusable, as far as I know. It would be useful in case the system under test calls the function multiple times. I know this works with stubs.
Context
The text was updated successfully, but these errors were encountered: