Closed mjgp2 closed 2 years ago
Same thing with jest-mock-extended. I think you should check more strictly, like matchers[0]._isAllArgsFunctionMatcher === true
Can someone make a PR with test for this pls?
Sorry for the delay... I didn't fully understand this one because I don't use either of these two libraries so I needed some extra time to review. It's in v3.5.1.
Brilliant, thanks!
Hi! 👋
I had a problem using
createMock
from@golevelup/ts-jest
because it uses proxies to fake properties, and the test below against_isAllArgsFunctionMatcher
gives a false positive (returns a jest.fn() instance).Here is the diff that solved my problem: