Successful Server Access
Learn what to do once we gain access to the server.
We'll cover the following...
In the success scenario, we need to mock the axios
library to return a successful response. We will be using the same mockRequest()
utility introduced in the Async Action Creators lesson.
Our basic success tests need to check whether API_FINISHED
is dispatched once the API is done. Test also check whether the success()
action creator passes the response and is dispatched to the store once it is called.
// Success tests
...