Skip to content

Commit 4a02014

Browse files
committed
Add coverage testing
1 parent 8ebe6b1 commit 4a02014

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
node_modules
33
tmp
44
*.log*
5+
coverage
6+
.nyc_output

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,31 @@
3535
"xtend": "^4.0.1"
3636
},
3737
"devDependencies": {
38+
"hastscript": "^3.0.1",
3839
"is-hidden": "^1.1.0",
3940
"mdast-util-assert": "^1.0.0",
4041
"negate": "^1.0.0",
42+
"nyc": "^10.1.2",
4143
"rehype-parse": "^2.0.1",
4244
"remark-parse": "^2.2.0",
4345
"remark-stringify": "^2.3.0",
4446
"tape": "^4.6.3",
4547
"unified": "^5.1.0",
48+
"unist-builder": "^1.0.2",
4649
"unist-util-remove-position": "^1.1.0",
4750
"xo": "^0.17.1"
4851
},
4952
"scripts": {
5053
"lint": "xo",
5154
"test-api": "node tests",
52-
"test": "npm run lint && npm run test-api"
55+
"test-coverage": "nyc --reporter lcov tape tests/index.js",
56+
"test": "npm run lint && npm run test-coverage"
57+
},
58+
"nyc": {
59+
"check-coverage": true,
60+
"lines": 100,
61+
"functions": 100,
62+
"branches": 100
5363
},
5464
"xo": {
5565
"space": true

0 commit comments

Comments
 (0)