Skip to content

Commit

Permalink
Add Coverage script and coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
Joakim committed Oct 29, 2019
1 parent f479a5a commit 4d910de
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ node_js:
install: npm install

script: echo "Running tests against $(node -v)..."
script: npm run test
script: npm run test:integration
script: npm run test:unit

after_script:
- npm run coverage
- cat ./coverage/lcov.info | coveralls

services:
- mongodb
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"prepublishOnly": "npm run lint && npm run test && npm run docs",
"test:integration": "isparta cover _mocha -- --opts test/integration/mocha.opts",
"test:unit": "isparta cover _mocha -- --opts test/unit/mocha.opts",
"test": "npm run test:unit && npm run test:integration"
"coverage": "isparta cover _mocha -- --opts test/mocha.opts"
},
"devDependencies": {
"chai": "4.2.0",
Expand Down
5 changes: 5 additions & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
./test/**/**/*.test.js
--recursive
--reporter spec
--timeout 2000
--exit

0 comments on commit 4d910de

Please sign in to comment.