Skip to content

Commit

Permalink
[Tests] add nyc for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Oct 20, 2023
1 parent e0770e5 commit e25bc37
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
17 changes: 17 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extension": [
".js",
".cjs",
".mjs"
],
"all": true,
"check-coverage": false,
"reporter": ["text-summary", "text", "html", "json", "lcov"],
"exclude": [
"coverage",
"example",
"test"
],
"sourceMap": true,
"instrument": true
}
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
},
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run lint",
"lint": "eslint .",
"tests-only": "tape test/*",
"lint": "eslint --ext=js,mjs .",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx aud",
"posttest": "aud --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
Expand All @@ -30,10 +30,12 @@
},
"devDependencies": {
"@ljharb/eslint-config": "^21.1.0",
"aud": "^2.0.3",
"auto-changelog": "^2.4.0",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
"npmignore": "^0.3.0",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.1"
},
Expand Down

0 comments on commit e25bc37

Please sign in to comment.