title: Jest unit test with Luxon: how do I mock .setZone('local')
body: <p>I have a very simple date component:</p>
  
  <pre><code>import { DateTime } from 'luxon';
  export const SimpleDateCell = ({ item, itemKey }) =&gt; {
      const isoDateString = item[itemKey];
  
      if (!isoDateString) {
          return null;
      }
  
      const formattedDate = DateTime
          .fromISO(isoDateString, { zone: 'utc' })
          .setZone('local')
          .toLocaleString(DateTime.DATETIME_MED);
  
      return (
          &lt;time dateTime={isoDateString} title={isoDateString}&gt;
              {formattedDate}
          &lt;/time&gt;
      ); };
  </code></pre>
  
  <p>And I was testing it locally with simply:</p>
  
  <pre><code>import React from 'react'; 
  import SimpleDateCell from './SimpleDateCell'; 
  import { DateTime, Settings } from 'luxon';
  import renderer from 'react-test-renderer';
  
  const testData = {
      companyName: 'test company',
      tenantId: 'ai/prod/00DA0000000XoMwMAK',
      // this will be different on different servers when .setZone('local')
      createdDate: '2019-02-13T15:53:00', };
  
  describe('SimpleDateCell', () =&gt; {
      it('should match the snapshot', () =&gt; {
  
  
          const tree = renderer
              .create(
                  &lt;SimpleDateCell item={testData} itemKey="createdDate" /&gt;
              ).toJSON();
          expect(tree).toMatchSnapshot();
      });  });
  </code></pre>
  
  <p>The problem is the unit test has to be run in the same timezone as I make the snapshot.  So our CI server is rejecting this.  </p>
  
  <p><strong>Is there a way to make this pass in any timezone?</strong>  Maybe mock the  setZone('local') response?  Any CI experts out there use luxon?</p>
  
  <p>Thank you!</p>