What is the “Black E” in istanbul report (jest coverage report)?
As far as I know, “I” means if path is not taken, “E” means else path is not taken. However, I found there are two versions of “E”, one is in yellow font the other is in black font. (as you can see in the following pic.)
jest reactjs – how to unit test useEffect with cleanup with cancellation
I am trying to write a unit test that will test a useEffect that calls an api (let’s call it fetchData
) so that when the component containing the useEffect unmounts or re-renders from the dependencies updating, we can test the cancellation path.