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

Mimic.expect/4 behaviour on number of calls being exceeded surprised me #60

Open
paulanthonywilson opened this issue Jan 17, 2024 · 1 comment

Comments

@paulanthonywilson
Copy link

Version 1.7.4

Hi, I've noticed that if the number of calls exceeds the expected count (default 1) on a mocked function, it reverts to calling the original function. I would have expected it to raise an error.

Is the behavior deliberate? I wanted to check before raising a documentation PR.

(I've a workaround involving initially stubbing with a stub-which-flunks (tm)).

@kennethito
Copy link

Given the wording of the option and documentation, this feels almost like a bug to me. It behaves like at_least_num_calls.

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

No branches or pull requests

2 participants