Skip to content

Commit 3e56f7c

Browse files
committed
Add coverage tests
1 parent 49a95e9 commit 3e56f7c

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-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/

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,23 @@
3030
"unist-util-remove": "^1.0.0"
3131
},
3232
"devDependencies": {
33+
"nyc": "^12.0.2",
3334
"prettier": "^1.14.2",
3435
"tape": "^4.0.0",
3536
"unist-builder": "^1.0.0",
3637
"xo": "^0.22.0"
3738
},
3839
"scripts": {
3940
"format": "prettier --write \"**/*.js\" && xo --fix",
40-
"test": "node test"
41+
"test-api": "node test",
42+
"test-coverage": "nyc --reporter lcov tape 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)