This project is built to understand basic concepts of javascript testing techniques.
Initialize npm with:
npm init
The current version of Jest as it is does not recognize the import statement. In order for you to be able to use ES6 modules for this project you may do the following:
Install the @babel/preset-env package
npm i -D @babel/preset-env
Create a .babelrc file in the project’s root with the following lines of code:
{ "presets": ["@babel/preset-env"] }
Install eslint with running the following command
npm install eslint --save-dev
npm install --save-dev jest
To run the tests go ahead and run:
npm run jest
- npm 6.4.1
- Javascript
- Jest