I have a component with the following code
<Resizable
...
onResizeStop={(e, direction, ref, d) => {
someFunc(d.width)
}}
...
>
I want to test the onResizeStop prop. I could make a new named function and assign it to the prop but I am not very willing to change the original code for testing purposes.
What should be the ideal way to test this prop. Do I need to make a mock function? How do I compare the real prop value and the expected value?