ded / reqwest

browser asynchronous http requests
2.94k stars 341 forks source link

reqwest promise with Nock #266

Open dsun29 opened 7 years ago

dsun29 commented 7 years ago

I tried yesterday to use nock for unit testing in a React/Redux/reqwest application and I was unable to make them work together. Later I had to replace reqwest with fecth. The details of the error can be found in the link below. I don't want to give up reqwest though. Do you guys mind to take a look when you have time?

https://stackoverflow.com/questions/45470427/async-callback-was-not-invoked-within-timeout-nock-reqwest

shiyuwudi commented 6 years ago

try manual mock the reqwest module to your one. http://facebook.github.io/jest/docs/en/manual-mocks.html#content