Created
March 22, 2019 06:22
-
-
Save kephin/5178ddf9d0c720f79a50389535ed78f8 to your computer and use it in GitHub Desktop.
Mock Date.now
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
// mock Date.now | |
const realDateNow = Date.now | |
Date.now = jest.fn(() => 11421423523) | |
// set back | |
Date.now = realDateNow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment