The Spring Boot application that we created in Chapter 4, Securing and Testing Your Backend, is needed (GitHub: https://github.com/PacktPublishing/Hands-On-Full-Stack-Development-with-Spring-Boot-2.0-and-React/tree/master/Chapter%204).
We also need the React app that we used in the previous chapter (GitHub: https://github.com/PacktPublishing/Hands-On-Full-Stack-Development-with-Spring-Boot-2.0-and-React/tree/master/Chapter%2011).
Jest is a test library for JavaScript and it is developed by Facebook (https://facebook.github.io/jest/en/). Jest is widely used with React and it provides lots of useful features for testing. You can create a snapshot test, where you can take snapshots from React trees and investigate how states are changing. Jest also has mock functionalities that you can use to test, for example, your asynchronous REST API calls. Jest also provides functions that are needed for the assertions in your test cases.
We will first see how you can create...