Skip to content

Commit 5800396

Browse files
committed
Add coverage tests
1 parent 27c57f5 commit 5800396

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.DS_Store
22
*.log
3+
.nyc_output/
4+
coverage/
35
node_modules/
46
yarn.lock

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
coverage/

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ language: node_js
22
node_js:
33
- lts/boron
44
- node
5+
after_script: bash <(curl -s https://codecov.io/bash)

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,23 @@
3030
"unist-util-visit": "^1.0.0"
3131
},
3232
"devDependencies": {
33+
"nyc": "^12.0.2",
3334
"prettier": "^1.14.2",
3435
"remark": "^9.0.0",
3536
"tape": "^4.0.0",
3637
"xo": "^0.22.0"
3738
},
3839
"scripts": {
3940
"format": "prettier --write \"**/*.js\" && xo --fix",
40-
"test": "tape test/*.js"
41+
"test-api": "tape test/test.js",
42+
"test-coverage": "nyc --reporter lcov tape test/test.js",
43+
"test": "npm run format && npm run test-coverage"
44+
},
45+
"nyc": {
46+
"check-coverage": true,
47+
"lines": 100,
48+
"functions": 100,
49+
"branches": 100
4150
},
4251
"prettier": {
4352
"tabWidth": 2,

0 commit comments

Comments
 (0)