title: Can't mock date/moment in Jest
body: <p>I am writing a test for a Vue method that uses moment to format and return today's date, and am trying to mock moment in my test so that "today's date" isn't always changing when I run my tests.</p>
  
  <p>My method is</p>
  
  <pre><code>return `Today is ${moment().format('MMM Do YY')}`;
  </code></pre>
  
  <p>I read that because Moment relies on Date.now() anyways, you can just mock that.</p>
  
  <p>In my test I have: </p>
  
  <pre><code>test('prints out daily greeting', () =&gt; {
      Date.now = jest.fn(() =&gt; 1587893830000);
  
      expect(GreetingPage.methods.greetingMessage.toBe('Today is May April 26th 2020');
    });
  </code></pre>
  
  <p>However, when I run my test, it always receives 'undefined' instead of the date. I'm not sure what is wrong.</p>