Created
September 27, 2017 00:14
-
-
Save nealfennimore/479b48c2949372d36f976ef109590fd8 to your computer and use it in GitHub Desktop.
Mock Moment with Jest so it's always utc for tests
This file contains 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
import moment from 'moment'; | |
const _constructor = ( ...args ) => moment.utc( ...args ); | |
const clone = Object.assign( _constructor, moment ); | |
export default clone; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment