How do i test if a function that isn\'t being passed as props has been called with jest/RTL?
function CreateForm() { const submitHandler = () => { /