title: How to mock Date object in typescript using Jest?
body: <p>I am trying to mock a date object that will be utilized for all the unit test cases. I have many references for javascript, but that is not working in typescript due to type errors. can anyone provide a solution to overcome this issue?</p>
  
  <pre><code>// sampleMethod() Test Suite
  describe('sample Method', () =&gt; {
      it('should match two objects', () =&gt; {
          // Preparing
          const sampleRequest: sampleRequestType = {
              key: '0',
              status: 'success',
              creation_time: new Date(),
              attempts: 0,
              last_attempt_time: new Date()
          };
          // Executing
          const result = sampleobject.sampleMethod();
          // Verifying
          expect(result).toEqual(sampleRequest); // assume result also return the same value as sampleRequest
      });
  });
  </code></pre>