An example, showing the TDD mindset with the red-green & refactor cycle.
-
get NodeJS, created with NodeJS version 4.6.1, but uses nothing special, should work with Node JS 4+
-
clone the project
-
go to the cloned project directory
-
run:
npm install
-
run:
npm run test
to see the test results -
for development and continuous testing, run:
npm run test:watch
-
to generate the ESlint report, run:
npm run eslint:html-report
-
to check the code coverage, run:
npm run test:coverage