Skip to content

Instantly share code, notes, and snippets.

@nealfennimore
Created September 27, 2017 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nealfennimore/479b48c2949372d36f976ef109590fd8 to your computer and use it in GitHub Desktop.
Save nealfennimore/479b48c2949372d36f976ef109590fd8 to your computer and use it in GitHub Desktop.
Mock Moment with Jest so it's always utc for tests
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