Adding node.js test coverage from CircleCI to Code Climate

PUBLISHED ON DEC 18, 2016 — JAVASCRIPT
general:
  artifacts:
    - "coverage"

test:
  post:
    - CODECLIMATE_REPO_TOKEN=$CODECLIMATE_REPO_TOKEN ./node_modules/.bin/codeclimate-test-reporter < coverage/lcov.info
"test": "NODE_ENV=test ./node_modules/.bin/jasmine"

to

"test": "NODE_ENV=test ./node_modules/.bin/istanbul cover --include-all-sources ./node_modules/.bin/jasmine"

Now, when CircleCI runs your test suite, it’ll generate a coverage report using istanbul and then send that report to Code Climate.