Closed rraziel closed 1 year ago
Hey, yeah I've seen this in other mocking libs (https://mockk.io/ for example). Definitely worth considering. There isn't any existing code that does this, FYI.
this is fixed in https://github.com/marchaos/jest-mock-extended/pull/110
Hello,
It could be nice having an option that causes any proxied method throw by default until a
.mock*()
is called on it, something like:The idea is to avoid forgetting about mocking some return values/etc. and make the test setup less error prone.
I couldn't seem to find any such option in the existing codebase or documentation, but maybe I didn't look hard enough 😄
Great work on this library btw.