Setting up Jest in the Local Machine

While installing Jest: just remember to install it as a dev dependency. The reason behind this is very simple. We just do testing in the dev environment and not in the prod environment.

 

Step 1: Open a new folder and do either npm init or npm init -y (to set all default values in the npm package installation)

 

Step 2: Install npm package Jest in the dev dependencies.

npm i -D jest

Drumrolls! 🥁🎉 Setup of Jest Framework is done in the project.

Discussion

5

0