how do I write the unit test to test the following code. how can i execute the useEffect hook and catch it in side unit test.
useEffect(() => { if (exi