How to test useRef with the “current” prop in jest/enzyme
问题 I hope someone can point me in the right direction to test useRef in the component below. I have a component structured something like below. I am trying to test the functionality within the otherFunction() but I'm not sure how to mock the current property that comes off the component ref. Has anyone done something like this before? const Component = (props) => { const thisComponent = useRef(null); const otherFunction = ({ current, previousSibling }) => { if (previousSibling) return