Setting up Jest is pretty straightforward and painless. You can access the entire code used in this chapter in the GitHub repository, inside of the CH02 folder. However, we suggest that you get started with an empty folder and walk through the hands-on tutorial, in order to get familiar with the process.
- Create the project and initialize it with YARN.
Create an empty folder and initialize it with YARN or npm. In this book, we will use YARN, but feel free to explore. To initialize the project, open a Terminal of your choice and run the following commands:
mkdir CHO2
cd CHO2
yarn init
Galaxy-A7-2017:CH02 sureshkumarmukhiyahvl$ yarn init
yarn init v1.12.1
question name (CH02): testing-redux-application
question version (1.0.0):
question description: Testing React and Redux applications
question entry point (index.js):
question repository url:
question author: Suresh Kumar...