I'm trying to test my web page using MSW, jest, and react-testing-library. The app is built with NextJS and JS.
I set up the MSW browser worker and everything goes fine, but when I tried to do the same with the node server throws an error.
The error is the following:
ReferenceError: fetch is not defined
I know that fetch is a browser method and doesn't run on node. I thought that setting up MSW will, somehow, override fetch to run in node for the test.
Does anyone know how I had some bad setup or do I have to do more setting things to run my test?
Thanks in advance.