Skip to content

Commit 3b48fb2

Browse files
committed
[Tests] add npm run coverage
1 parent 59483d1 commit 3b48fb2

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ node_modules
55
npm-shrinkwrap.json
66
package-lock.json
77
yarn.lock
8+
9+
# Coverage
10+
coverage
11+
.nyc_output

.nycrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"all": true,
3+
"check-coverage": true,
4+
"instrumentation": false,
5+
"sourceMap": false,
6+
"reporter": "html",
7+
"lines": 96,
8+
"statements": 95,
9+
"functions": 96,
10+
"branches": 92,
11+
"exclude": [
12+
"coverage",
13+
"example",
14+
"test",
15+
"test-core-js.js"
16+
]
17+
}

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ env:
2828
matrix:
2929
fast_finish: true
3030
include:
31+
- node_js: "node"
32+
env: COVERAGE=true
3133
- node_js: "8.5"
3234
env: TEST=true ALLOW_FAILURE=true
3335
- node_js: "8.4"

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
"main": "index.js",
66
"devDependencies": {
77
"core-js": "^2.5.1",
8+
"nyc": "^10.3.2",
89
"tape": "^4.8.0"
910
},
1011
"scripts": {
1112
"test": "npm run tests-only",
1213
"pretests-only": "node test-core-js",
13-
"tests-only": "tape test/*.js"
14+
"tests-only": "tape test/*.js",
15+
"coverage": "nyc npm run tests-only"
1416
},
1517
"testling": {
1618
"files": [

0 commit comments

Comments
 (0)