Skip to content

Commit

Permalink
Merge pull request #345 from TrySound/coverage
Browse files Browse the repository at this point in the history
Enable coverage via nyc
  • Loading branch information
TrySound committed Jul 18, 2019
2 parents dfb3c4b + fb7bc09 commit 232a554
Show file tree
Hide file tree
Showing 5 changed files with 2,245 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
test/actual
actual
coverage
.nyc_output

# npm
node_modules
Expand Down
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
sudo: false
language: node_js
node_js:
- node
- 'node'
- '12'
- '10'
- '8'
- '6'
- '0.10'
- '0.12'
- 4
- 6
script: make test-ci
script: yarn test-ci
after_success: yarn coverage
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ test: lint
echo "CommonMark stat:\n"
./support/specsplit.js test/fixtures/commonmark/spec.txt

coverage:
rm -rf coverage
istanbul cover node_modules/.bin/_mocha

test-ci: lint
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage

gh-pages:
if [ "git branch --list gh-pages" ]; then \
git branch -D gh-pages ; \
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
"node": ">= 0.10.0"
},
"scripts": {
"test": "make test"
"test": "make test",
"test-ci": "nyc mocha -R spec --bail",
"coverage": "yarn add coveralls@2 && nyc report --reporter=text-lcov | coveralls"
},
"dependencies": {
"argparse": "~0.1.15",
Expand All @@ -68,7 +70,8 @@
"gulp-format-md": "^0.1.10",
"highlight.js": "^9.7.0",
"marked": "0.3.2",
"mocha": "*"
"mocha": "^6.1.4",
"nyc": "^14.1.1"
},
"keywords": [
"commonmark",
Expand Down

0 comments on commit 232a554

Please sign in to comment.