Skip to content

Commit

Permalink
[Tests] use nyc
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Apr 29, 2021
1 parent 035abac commit fe70752
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Gruntfile.js
*.min.js
coverage/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ node_modules/
npm-shrinkwrap.json
package-lock.json
yarn.lock

coverage/
.nyc_output/
12 changes: 12 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"all": true,
"check-coverage": false,
"reporter": ["text-summary", "text", "html", "json"],
"exclude": [
"Gruntfile.js",
"*.min.js",
"coverage",
"test",
"test-sham"
]
}
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
"scripts": {
"prepublish": "safe-publish-latest && (not-in-publish || npm run minify)",
"pretest": "npm run lint && evalmd *.md",
"test": "npm run tests-only",
"test": "NODE_OPTIONS='--unhandled-rejections=none' npm run tests-only",
"posttest": "aud --production",
"tests-only": "NODE_OPTIONS='--unhandled-rejections=none' npm run test:shim && npm run test:sham",
"test:shim": "mocha test/*.js test/*/*.js",
"test:sham": "mocha test-sham/*.js",
"tests-only": "nyc mocha 'test/**/*.js' 'test-sham/*.js'",
"test:shim": "nyc mocha 'test/**/*.js'",
"test:sham": "nyc mocha 'test-sham/*.js'",
"test:native": "NO_ES6_SHIM=1 npm run tests-only",
"lint": "npm run lint:shim && npm run lint:sham",
"lint:shim": "eslint es6-shim.js test/*.js test/*/*.js",
Expand Down Expand Up @@ -72,6 +72,7 @@
"grunt-saucelabs": "^8.6.3",
"in-publish": "^2.0.1",
"mocha": "^3.5.3",
"nyc": "^10.3.2",
"promises-aplus-tests": "^2.1.2",
"promises-es6-tests": "^0.5.0",
"safe-publish-latest": "^1.1.4",
Expand Down
3 changes: 3 additions & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
--require es5-shim
--require ./es6-shim
--require ./es6-sham
--require test/test_helpers.js

0 comments on commit fe70752

Please sign in to comment.