I used "useEffect" to achieve functionality of "componentWillUnmount" in functional component. How to trigger that while testing the component using Jest/Enzyme?
My Component:
const myComp = () => {
useEffect(() => () => {
console.log('Unmounted');
}, []);
return <div>Test</div>;
}