config: use pre- and post-hooks of npm scripts for testing

This fixes the coverage reporting of nyc.
This commit is contained in:
Xymorot 2019-12-15 01:35:33 +01:00
parent a8b9ccf832
commit ecab5d6552
1 changed files with 6 additions and 2 deletions

View File

@ -26,8 +26,12 @@
"watch": "concurrently -c green,yellow,cyan -n webpack,index,typescript \"npm run watch:webpack\" \"npm run watch:index\" \"npm run watch:ts\"",
"test:before": "node tests/setup/before.js",
"test:after": "node tests/setup/after.js",
"test:fast": "npm run test:before && mocha --grep @slow --invert && npm run test:after",
"test": "npm run test:before && mocha && npm run test:after",
"pretest:fast": "npm run test:before",
"test:fast": "mocha --grep @slow --invert",
"posttest:fast": "npm run test:after",
"pretest": "npm run test:before",
"test": "mocha",
"posttest": "npm run test:after",
"coverage:fast": "nyc npm run test:fast",
"coverage": "nyc npm run test",
"lint:check": "eslint --print-config forge.config.js | eslint-config-prettier-check",