title: Formik, jest, yup : how to test validation?
body: <p>i can't find a way to test form yup validation:</p>
  
  <pre><code>it('displays error on submit if name is empty', async () =&gt; {
      const wrapper = mount(&lt;MyFormik/&gt;)
      const getForm = () =&gt; wrapper.find('form')
  
      wrapper.find('input[name="name"]').simulate('change', {
        persist: () =&gt; {},
        target: {
          name: 'name',
          value: ''
        }
      })
  
      wrapper
        .find('MyInnerForm')
        .props()
        .submitForm()
  
  
      await wait(0) // await next tick or even 1s...
      wrapper.update()
  
      expect(
        wrapper
        .update()
        .find('.error')
        .exists()
      )
      .toBeTruthy() // FALSE!
    })
  </code></pre>
  
  <p>No matter if i wait after submit, update wrapper errors prop is always empty.</p>
  
  <p>And the solution here are not working for me: </p>
  
  <p><a href="https://github.com/jaredpalmer/formik/issues/1146" rel="nofollow noreferrer">https://github.com/jaredpalmer/formik/issues/1146</a></p>
  
  <p><a href="https://github.com/jaredpalmer/formik/issues/110" rel="nofollow noreferrer">https://github.com/jaredpalmer/formik/issues/110</a></p>
  
  <p>Looks like wrapper won't update</p>
  
  <p>Here's the log of formik props after  submit: </p>
  
  <pre><code>{ errors: {},
           label: '',
           name: 'name',
           type: 'text',
           values: { name: '' },
           touched: { name: true },
           isValidating: false,
           status: undefined,
           initialValues: { name: '' },
           validateOnChange: true,
           validateOnBlur: true } }
           ...
  
           submitCount: 1,
           isValid: false,
  </code></pre>