React jest testing — mock function inside functional component
I need to write test using jest in React, and I would like to mock a function inside the React functional component.
I find a way in react-test-renderer
for calling handleClick
in react class…