Forked from lededje/gist:44aeddf1dc2a5e6064e3b29dc35a7a2d
Created
March 25, 2018 19:23
-
-
Save egor-smirnov/153dc629f76b4e69012eaf296a8cc8ff to your computer and use it in GitHub Desktop.
Jest Mocking Moment to *always* be utc for tests
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.mock('moment', () => { | |
| const moment = require.requireActual('moment'); | |
| return moment.utc; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment