merge mocharc.coverage into mocharc (#5385)

pull/5404/head
milahu 4 years ago committed by GitHub
parent 87ed0b2f42
commit ccf0bcf469
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,10 +0,0 @@
module.exports = Object.assign(
{},
require('./mocharc.js'),
{
fullTrace: true,
require: [
'source-map-support/register'
]
}
);

@ -3,3 +3,13 @@ module.exports = {
'test/test.js'
]
};
// add coverage options when running 'npx c8 mocha'
if (process.env.NODE_V8_COVERAGE) {
Object.assign(module.exports, {
fullTrace: true,
require: [
'source-map-support/register'
]
});
}

@ -23,10 +23,10 @@
},
"types": "types/runtime/index.d.ts",
"scripts": {
"test": "mocha --config .mocharc.js",
"test": "mocha",
"test:unit": "mocha --require sucrase/register --recursive src/**/__test__.ts",
"quicktest": "mocha --config .mocharc.js",
"precoverage": "c8 mocha --config .mocharc.coverage.js",
"quicktest": "mocha",
"precoverage": "c8 mocha",
"coverage": "c8 report --reporter=text-lcov > coverage.lcov && c8 report --reporter=html",
"codecov": "codecov",
"precodecov": "npm run coverage",

Loading…
Cancel
Save