Demo unit test using Circle-CI
This is a demo of using Circle-CI for continuous integration.
How to run locally:
run npm test
ignore the failure in codecov token
Essential components
- mocha - test runner
- nyc - code coverage report
- codecov - code coverage badge
- circle-ci - continuous integration
Note
- circle.yml - this is the file used for configuring circle-ci. configured it to use node 8.11.4 and generate code coverage artifact, then send it to codecov.io
- npm test command - this invokes nyc, mocha, and codecov library. configurations are in their corresponding yml files
- coverage report -
open
./coverage/lcov-report/index.html
file after running the test to view code coverage