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
Thank you for the amazing library - I'm a happy user! I found one issue with how the "not" matcher behaves when the function is called multiple times. Please, take a look:
I guess that the problem here is that one function call ("4") satisfies the matcher. I wonder whether the "not" matcher should mean "none of the calls equal" or "not every call equals". What do you think?
The text was updated successfully, but these errors were encountered:
Yeah, you diagnosed the issue you ran into here. My recommendation (since it should be unusual that a collaboration test should intentionally make a test double blow up) would be to treat the explosion as a stubbing and not a verification.
Reason being: verifying something did not happen isn't much of a specification at all (surely there are millions of things your subject under test doesn't do, but they don't all warrant an assertion)
Try this instead:
letroll=td.function();td.when(roll(1)).thenThrow(newError('woah do not roll a 1'))roll(1);
Thank you for the amazing library - I'm a happy user! I found one issue with how the "not" matcher behaves when the function is called multiple times. Please, take a look:
This works as expected - the test fails with:
However this one does not fail the test:
I guess that the problem here is that one function call ("4") satisfies the matcher. I wonder whether the "not" matcher should mean "none of the calls equal" or "not every call equals". What do you think?
The text was updated successfully, but these errors were encountered: