Created
March 21, 2023 17:34
-
-
Save DWboutin/2a2b48e332dc2373a91f990d6e2a984c to your computer and use it in GitHub Desktop.
Mock date with Jest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jest | |
.useFakeTimers({ now: currentDate, advanceTimers: true }) | |
.setSystemTime(currentDate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment