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

Documentation: Calls to cardinality methods on an Expectation override all previous calls #476

Open
floehopper opened this issue Mar 9, 2020 · 1 comment · May be fixed by #481
Open

Comments

@floehopper
Copy link
Member

It would be good to clarify this behaviour in the documentation. See #474 (review).

nitishr added a commit to nitishr/mocha that referenced this issue Mar 23, 2020
By translating all other cardinality methods to the times method, we
clarify both that all the other methods are merely syntactic sugar, and
that they all set the lower and upper limits to the number of calls.

Closes freerange#476
@nitishr nitishr linked a pull request Mar 23, 2020 that will close this issue
@floehopper
Copy link
Member Author

I wonder whether it's worth considering raising an exception or displaying a warning when cardinality is overridden like this...? I can't immediately think why anyone would legitimately want to do it and to change the behaviour would be a breaking change which we'd need to deprecate.

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.

1 participant