jefflau / jest-fetch-mock

Jest mock for fetch
MIT License
882 stars 116 forks source link

Consider making fetch.resetMocks() more prominent in the documentation #169

Open toolness opened 3 years ago

toolness commented 3 years ago

Hello! Thanks for writing this library. I was getting extremely confusing behavior writing my test suite with it until I realized that I had to call fetch.resetMocks() in a beforeEach(). I think it would help to make this more prominent in the documentation, as without it, debugging one's tests can be very frustrating.

yinzara commented 3 years ago

Can you suggest how?

We already have a section entitled "Reset mocks between tests with fetch.resetMocks" and use the "fetch.resetMocks()" call in a "beforeEach" block in every example given.