Skip to content

Commit fb7bc09

Browse files
committed
Enable coverage via nyc
- dropped node 0.12 and 4 - added node 10 and 12 - added yarn lockfile - migrated coverage to nyc
1 parent dfb3c4b commit fb7bc09

File tree

5 files changed

+2245
-15
lines changed

5 files changed

+2245
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
test/actual
77
actual
88
coverage
9+
.nyc_output
910

1011
# npm
1112
node_modules

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
- node
4+
- 'node'
5+
- '12'
6+
- '10'
7+
- '8'
58
- '6'
6-
- '0.10'
7-
- '0.12'
8-
- 4
9-
- 6
10-
script: make test-ci
9+
script: yarn test-ci
10+
after_success: yarn coverage

Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ test: lint
2626
echo "CommonMark stat:\n"
2727
./support/specsplit.js test/fixtures/commonmark/spec.txt
2828

29-
coverage:
30-
rm -rf coverage
31-
istanbul cover node_modules/.bin/_mocha
32-
33-
test-ci: lint
34-
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
35-
3629
gh-pages:
3730
if [ "git branch --list gh-pages" ]; then \
3831
git branch -D gh-pages ; \

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
"node": ">= 0.10.0"
5656
},
5757
"scripts": {
58-
"test": "make test"
58+
"test": "make test",
59+
"test-ci": "nyc mocha -R spec --bail",
60+
"coverage": "yarn add coveralls@2 && nyc report --reporter=text-lcov | coveralls"
5961
},
6062
"dependencies": {
6163
"argparse": "~0.1.15",
@@ -68,7 +70,8 @@
6870
"gulp-format-md": "^0.1.10",
6971
"highlight.js": "^9.7.0",
7072
"marked": "0.3.2",
71-
"mocha": "*"
73+
"mocha": "^6.1.4",
74+
"nyc": "^14.1.1"
7275
},
7376
"keywords": [
7477
"commonmark",

0 commit comments

Comments
 (0)