Reputation: 2161
Is there a way to disable all sockets in a jest unit test? In python, I use pytest-socket to get hermetic tests; if I accidentally forget to mock something that talks to the network (or there's something that's doing so without my knowledge), this will catch it and cause my test to fail. I'm looking for something similar for jest.
Upvotes: -2
Views: 26