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
importfoofrom'./foo'jest.mock('./foo')jest.mocked(foo.bar).mockResolvedValue(baz)// ^^^^^^^ jest/unbound-method reports an error hereexpect(foo.bar).toHaveBeenCalled()// no error here
Since jest.mocked will be called with mock functions, it should not make a difference whether it is bound or not, right? So I'd suggest to not report an error for unbound methods passed to jest.mocked, just like already happens when passing it to expect.
The text was updated successfully, but these errors were encountered:
Since
jest.mocked
will be called with mock functions, it should not make a difference whether it is bound or not, right? So I'd suggest to not report an error for unbound methods passed tojest.mocked
, just like already happens when passing it toexpect
.The text was updated successfully, but these errors were encountered: