DEV Community

Discussion on: Formik & React Testing Library and Screaming at a Computer for an Hour

 
xap5xap profile image
XAVIER PEREZ

Hello. How do you submit an event on the form in the test?

Thread Thread
 
rangeoshun profile image
Abel Varga • Edited

Basically like this:

fireEvent.submit(container.querySelector('form'))

container is the value returned in the object by the render method.