#npm
#js
#moment-js
#lodash
#jest
#master-in-software-engineering
This pill is for learning the basics of the npm tool to handle the dependencies and how to test your code with Jest.
npm is a tool that manages the dependencies of our Javascript project, both in client and in backend (NodeJs).
Jest is a JavaScript test runner, that is, a JavaScript library for creating, running, and structuring tests to ensure your code is doing what you expected it to do.
This pill already includes the solution for the tests.
* NPM Tool
* Javascript
* MomentJS Library
* Lodash Library
* Jest Library
First of all, once you have created and located to the folder where you want to place the local repository, you will have to clone the remote by running git clone https://github.com/assembler-school/npm-and-testing-basics.git
.
Once the repository has been cloned, you will have to use NPM to install the project dependencies by running npm install
. This will install Jest, Lodash and Moment libraries.
In order to run the test, you will have to run npm test
to check that the tests are correctly fulfilled. This instruction is the same as running npx jest --coverage
.
When running the test, a report including the results will be generated inside the coverage folder. Every time the test is runned, the report is updated.
This pill is a solution for assembler-school/npm-and-testing-basics repository developed by assembler-school