title: React-testing-library how get length of input value at onChange
body: <p>i'm trying to test my form with this code. 
  I wonder how i can simulate that if input value length is 10. onSubmit function will be called automatically</p>
  
  <pre><code>  describe('Form Component', () =&gt; {
       it('should submit when data filled length 10', async () =&gt; {
        const onSubmit = jest.fn()
        const { getByLabelText, getByTestId } = render(&lt;Form onSubmit={onSubmit} /&gt;)
        const input = getByLabelText('input')
        await act(async () =&gt; {
          await fireEvent.change(input, { target: { value: '123' } })
        })
        expect(onSubmit).toBeCalled()
       })
      })
  </code></pre>