In the preceding chapter, we discussed token authentication via JSON Web Tokens (JWT). Now, users can log in to our application and their session is stored on the client side in a JWT.
In this chapter, we will focus on how to write tests for, and with, Redux. As the elements of Redux are simply JavaScript objects and functions, they will be easy to test. This chapter will cover the following topics:
- Setting up a testing engine
- Testing action creators and reducers
- Mocking a Redux store, which is useful for testing asynchronous actions