Skip to content

Commit

Permalink
chore: add code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
UnbounDev committed Jun 6, 2019
1 parent b7466dc commit 0ebdbb2
Show file tree
Hide file tree
Showing 3 changed files with 605 additions and 17 deletions.
12 changes: 9 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ jobs:

- run:
name: Run mocha unit tests with JUnit as reporter
command: yarn test --exit --reporter mocha-junit-reporter --reporter-options mochaFile=reports/junit/mocha-junit-results.xml
command: |
npx nyc@latest \
--reporter=clover --reporter=cobertura --reporter=lcov --reporter=text \
--report-dir=reports/coverage \
mocha tests/*.js --exit \
--reporter mocha-junit-reporter \
--reporter-options mochaFile=reports/junit/mocha-junit-results.xml
when: always
- store_test_results:
path: reports/junit
path: reports/
- store_artifacts:
path: ./reports/junit/mocha-junit-results.xml
path: ./reports/
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"test": "tests"
},
"scripts": {
"test": "mocha tests/*.js"
"test": "nyc mocha tests/*.js"
},
"author": "austin brown <[email protected]> (http://www.azuqua.com/)",
"license": "MIT",
Expand All @@ -32,6 +32,7 @@
"grunt-mocha-test": "^0.13.3",
"mocha": "^6.1.4",
"mocha-junit-reporter": "^1.22.0",
"nyc": "^14.1.1",
"uuid": "^3.3.2"
},
"keywords": [
Expand Down
Loading

0 comments on commit 0ebdbb2

Please sign in to comment.