I have a sandbox where I've recreated the issue I'm encountering in my codebase. I have a form with a required field, and a callback inside of the submit handler for the form. The actual component correctly does not fire the event handler if the form is not valid. However, the test fires the handler and thus the callback.
I'm using React 16.x, React Testing Library 10.x, Jest DOM 5.x. (all version numbers can be seen in the sandbox above).
Is my implementation actually incorrect, or is my test bad? or is there a bug in the artificial DOM used for the tests? I'm at a loss.