Recommended approach using Jest. #2557
nicolaszein
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone! 🌻
I was wondering if you recommend any approach to use Jest and Nock.
I have a large test suite and there are some tests that I use Nock to mock external requests.
Usually, a test with Nock looks like this:
It turns out that I'm experiencing some flaky tests returning the error:
Even though I'm mocking the request.
If I ran the test alone it passes all the time. However, if I ran the entire suite or multiple tests with Nock mocks it sometimes fails with this error.
Should I update something in my tests?
Is there a recommended approach to use Nock with Jest?
Beta Was this translation helpful? Give feedback.
All reactions