You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
#992 and #1193 were closed with documentation changes in #1432 that describes the current behaviour:
An expectation instance only holds onto a single set of arguments specified with withArgs. Subsequent calls will overwrite the previously-specified set of arguments (even if they are different), so it is generally not intended that this method be invoked more than once per test case.
A single test may call the same mock multiple times with different arguments, but can not be written at this time due to this limitation.
Describe the solution you'd like
expectations can track multiple withArgs() call, each with their own expectations.
Describe alternatives you've considered
Workarounds with stubs or spies may be possible, but roughly doubles the amount of test code required (once to stub behaviour, and once to verify expectations).
Additional context
None
The text was updated successfully, but these errors were encountered:
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.
Is your feature request related to a problem? Please describe.
#992 and #1193 were closed with documentation changes in #1432 that describes the current behaviour:
A single test may call the same mock multiple times with different arguments, but can not be written at this time due to this limitation.
Describe the solution you'd like
expectation
s can track multiplewithArgs()
call, each with their own expectations.Describe alternatives you've considered
Workarounds with stubs or spies may be possible, but roughly doubles the amount of test code required (once to stub behaviour, and once to verify expectations).
Additional context
None
The text was updated successfully, but these errors were encountered: