title: Unit test jest enzyme throws error on Formik 'resetForm'
body: <p><strong>I am trying to run unit test (enzyme) throws error on Formik 'resetForm'.</strong></p>
  <blockquote>
  <p>TypeError: Cannot read property 'resetForm' of undefined</p>
  </blockquote>
  <p><em><strong>FormikForm.js</strong></em></p>
  <pre><code>_handleSubmitPress = (values, { resetForm }) =&gt; {
          const { onSubmit } = this.props;
  
          if (onSubmit) {
              onSubmit({ ...values, resetForm });
          }
      };
  </code></pre>
  <p><em><strong>UnitTest.js:</strong></em></p>
  <pre><code>it('Should fire formik form submit', () =&gt; {
      const UpdateButtonPressMock = jest.fn();
      const component = Component({
          onSubmit: UpdateButtonPressMock,
      });
      expect(component.find(Formik)).toHaveLength(1);
      component.find(Formik)
          .first()
          .simulate('Submit');
      expect(UpdateButtonPressMock).toHaveBeenCalled();
  });
  </code></pre>
  <p>I couldn't find any solution for this error.</p>
  <p>Could someone help me on the above? I would really appreciate any help.</p>