Closed rluvaton closed 1 year ago
Thanks for the issue and the PR!
Closed as done
we don't have LTS releases :) It's just the next major version (which I am not sure when lands).
Anyway, at first I regarded this as a breaking change, but it's really just fixing a bug, so the new patch version is out now.
For later reference, the clearing of state turned out too be a bit too aggressive, so fixed this up in #2593
Describe the bug
returns
not overridecallThrough
To Reproduce Run the following:
Expected behavior this function should return 2 without calling the original function
as
resolves
andthrows
does (and maybe even more)Context (please complete the following information): The reason I call
callThrough
is because I have a helper function that stub the function but keeping the result (I know you have spy but stub can provide both override and tracking) or if already stubbed does nothing (so there won't be an error for function already stubbed)replacing returns with
callsFake
works as expected