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
@jasonrberk Thank you for this github repo - I've been trying to get ESM mocks to work, and was unaware I needed to use @jest/globals. I ran into the same issue that you did, but I was able to get things working by calling .clearAllMocks() on the mocked objects instead of .mockClear() - if you do a console.log(mockedClass) it will show that there is a clearAllMocks function but not a mockClear - Maybe the documentation for Jest is out of date - hopefully this helps (or you haven't solved it already, lol
The text was updated successfully, but these errors were encountered:
@jasonrberk Thank you for this github repo - I've been trying to get ESM mocks to work, and was unaware I needed to use @jest/globals. I ran into the same issue that you did, but I was able to get things working by calling
.clearAllMocks()
on the mocked objects instead of.mockClear()
- if you do aconsole.log(mockedClass)
it will show that there is aclearAllMocks
function but not amockClear
- Maybe the documentation for Jest is out of date - hopefully this helps (or you haven't solved it already, lolThe text was updated successfully, but these errors were encountered: