Skip to content

Commit f7bf209

Browse files
committed
ci(nyc): Enforce 100% code coverage
1 parent 5c9310b commit f7bf209

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ script:
1111
- npm run test
1212
after_success:
1313
- if [ -n "${CODECOV_TOKEN:-}" ]; then npm run codecov; fi
14+
- npm run coverage
1415
- npm run semantic-release

package.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,18 @@
7373
"license": "MIT",
7474
"main": "lib/index.js",
7575
"nyc": {
76+
"lines": 100,
77+
"statements": 100,
78+
"functions": 100,
79+
"branches": 100,
7680
"include": [
7781
"lib/**/*.js"
78-
]
82+
],
83+
"reporter": [
84+
"lcov",
85+
"text"
86+
],
87+
"all": true
7988
},
8089
"peerDependencies": {
8190
"semantic-release": ">= 4"
@@ -100,11 +109,12 @@
100109
"cm": "git-cz",
101110
"codecov": "codecov",
102111
"commitmsg": "commitlint -e",
112+
"coverage": "nyc check-coverage",
103113
"lint": "eslint lib test package.json",
104114
"postcheckout": "yarn install || (rimraf && npm install)",
105115
"precommit": "npm run lint",
106116
"pretest": "npm run clean && npm run lint",
107117
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
108-
"test": "nyc --all ava -v && nyc report --reporter=lcov"
118+
"test": "nyc ava -v"
109119
}
110120
}

0 commit comments

Comments
 (0)