The Get All Speakers action

To begin testing with Redux, there are a few testing entry points we could start with. We could begin by testing actions, reducers, or even interactions with the store. The store tests would be more integration tests and we want to concentrate on unit tests in this chapter. That leaves actions and reducers. Either is a fine place to start, but we will start with actions because they are extremely simple and uncomplicated as a concept for testing.

The action that we need right now is one to request the retrieval of speaker information; in essence, a get all speakers action. As stated earlier, actions can be extremely simple; however, we have an issue in that our get all speakers service call is asynchronous. Actions were not really designed to handle asynchronous calls. For that reason, let’s start with something a little bit simpler and we will come back to this problem after we understand how to test a normal action.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.189.129