Skip to content

Commit 1550099

Browse files
committed
Add coverage with c8
1 parent be8e5c2 commit 1550099

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
run: npm install
3333

3434
- name: Run tests
35-
run: npm test
35+
run: npm run test-ci

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
yarn.lock
3+
/coverage

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"scripts": {
1616
"ava": "ava",
1717
"xo": "xo",
18-
"test": "npm run xo && npm run ava"
18+
"test": "npm run xo && npm run ava",
19+
"test-ci": "npm run xo && c8 ava"
1920
},
2021
"main": "index.js",
2122
"type": "module",
@@ -31,6 +32,12 @@
3132
"local",
3233
"wrapper"
3334
],
35+
"c8": {
36+
"reporter": [
37+
"lcovonly",
38+
"text"
39+
]
40+
},
3441
"dependencies": {
3542
"bin-check": "^4.1.0",
3643
"bin-version-check": "^5.0.0",
@@ -39,6 +46,7 @@
3946
},
4047
"devDependencies": {
4148
"ava": "^4.0.1",
49+
"c8": "^7.11.0",
4250
"executable": "^4.1.1",
4351
"nock": "^13.2.2",
4452
"path-exists": "^5.0.0",

0 commit comments

Comments
 (0)