react-redux-starter-kit icon indicating copy to clipboard operation
react-redux-starter-kit copied to clipboard

[QUESTION] mock API calls to test Async action creators

Open Jimeno0 opened this issue 8 years ago • 0 comments

Hi mate,

I found your doubleAsync action creator test extremly useful to know how to test an async action creator but what about when you use them to make API calls?

Im using thunk as a middleware and Im trying to mock the API calls but couldn't figured out how to do it. In most of examples I see that people uses nock but I understand that as far as we are using phantom to run the tests on the browser I cant run node to use nock.

Hope I made myself clear 😃

thanks in advice!

Jimeno0

🍻

Jimeno0 avatar Feb 03 '17 15:02 Jimeno0