Skip to content

Instantly share code, notes, and snippets.

@DWboutin
Created March 21, 2023 17:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save DWboutin/2a2b48e332dc2373a91f990d6e2a984c to your computer and use it in GitHub Desktop.
Mock date with Jest
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