Created
November 17, 2021 12:43
-
-
Save vcapretz/2d25e450780e575486604e95f651957a to your computer and use it in GitHub Desktop.
mocking dates with `jest` and `mockdate`
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
beforeEach(() => { | |
Mockdate.set('2021-06-27T21:32:09.419Z'); | |
}); | |
afterEach(() => { | |
Mockdate.reset(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment