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
Updated my dependencies on package.json and by upgrading jest from 21.2.1 to 23.4.2 all my test broke and threw the same error:
● Test suite failed to run
TypeError: jest.genMockFunction is not a function
7 | global._Date = Date
8 | global.Date = jest.fn(() => new global._Date(DATE_TO_USE.toISOString()))
> 9 | Date.now = jest.genMockFunction().mockReturnValue(DATE_TO_USE.getTime())
Had to downgrade to de prev version to solve the issue, but in the long run we might have to change how we mock dates using jest.
UI Version: 0.9.3
Description:
Updated my dependencies on
package.json
and by upgradingjest
from21.2.1
to23.4.2
all my test broke and threw the same error:Had to downgrade to de prev version to solve the issue, but in the long run we might have to change how we mock dates using
jest
.See the following issue:
jest.genMockFn
andjest.genMockFunction
jestjs/jest#6173The text was updated successfully, but these errors were encountered: