Skip to content

Commit ea360ba

Browse files
committed
[Tests] switch to nyc for coverage
1 parent 9c8f809 commit ea360ba

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

.nycrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"all": true,
3+
"check-coverage": false,
4+
"reporter": ["text-summary", "text", "html", "json"],
5+
"lines": 86,
6+
"statements": 85.93,
7+
"functions": 82.43,
8+
"branches": 76.06,
9+
"exclude": [
10+
"coverage",
11+
"test"
12+
]
13+
}

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,25 @@
2727
},
2828
"devDependencies": {
2929
"@ljharb/eslint-config": "^21.0.1",
30-
"covert": "^1.1.1",
3130
"eslint": "=8.8.0",
3231
"in-publish": "^2.0.1",
3332
"npmignore": "^0.3.0",
33+
"nyc": "^10.3.2",
3434
"safe-publish-latest": "^2.0.0",
3535
"tape": "^5.6.3"
3636
},
3737
"license": "MIT",
3838
"scripts": {
39-
"prepublishOnly": "safe-publish-latest",
40-
"prepublish": "not-in-publish || npm run prepublishOnly",
39+
"prepublishOnly": "safe-publish-latest",
40+
"prepublish": "not-in-publish || npm run prepublishOnly",
4141
"prepack": "npmignore --auto --commentLines=autogenerated",
4242
"pretest": "npm run lint",
4343
"test": "npm run tests-only",
44-
"posttest": "npm run coverage -- --quiet",
4544
"preaudit": "npm install --package-lock --package-lock-only",
4645
"audit": "npm audit",
4746
"postaudit": "rm package-lock.json",
48-
"tests-only": "node test",
49-
"coverage": "covert test/*.js",
50-
"lint": "eslint ."
47+
"tests-only": "nyc tape 'test/**/*.js'",
48+
"lint": "eslint --ext=js,mjs ."
5149
},
5250
"testling": {
5351
"files": "test/index.js",

0 commit comments

Comments
 (0)