Jest simulate offline network with Mock Service Worker (MSW) or other?

Viewed 839

Is it possible to use MSW with Jest to simulate offline network conditions? Alternatively non MSW based solutions would suffice. I also don't want to mock navigator.onLine as I want to test the error path when a network request fails due to being offline.

1 Answers
Related