Skip to content

Commit

Permalink
Support running tests with code coverage collection
Browse files Browse the repository at this point in the history
Coverage will only be measured if the `MEASURE_COVERAGE=true`
environment variable is set. We'll set that on CI, but it won't be
required to collect code coverage every single time we run the tests
locally.
  • Loading branch information
rmacklin committed Nov 2, 2020
1 parent 7742509 commit 6cd4447
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"start": "node lib/index.js",
"test": "mocha"
"test": "if [ \"${MEASURE_COVERAGE}\" = 'true' ]; then nyc mocha; else mocha; fi"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 6cd4447

Please sign in to comment.