Skip to content

Commit ccf0bcf

Browse files
authored
merge mocharc.coverage into mocharc (#5385)
1 parent 87ed0b2 commit ccf0bcf

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

.mocharc.coverage.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

.mocharc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,13 @@ module.exports = {
33
'test/test.js'
44
]
55
};
6+
7+
// add coverage options when running 'npx c8 mocha'
8+
if (process.env.NODE_V8_COVERAGE) {
9+
Object.assign(module.exports, {
10+
fullTrace: true,
11+
require: [
12+
'source-map-support/register'
13+
]
14+
});
15+
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
},
2424
"types": "types/runtime/index.d.ts",
2525
"scripts": {
26-
"test": "mocha --config .mocharc.js",
26+
"test": "mocha",
2727
"test:unit": "mocha --require sucrase/register --recursive src/**/__test__.ts",
28-
"quicktest": "mocha --config .mocharc.js",
29-
"precoverage": "c8 mocha --config .mocharc.coverage.js",
28+
"quicktest": "mocha",
29+
"precoverage": "c8 mocha",
3030
"coverage": "c8 report --reporter=text-lcov > coverage.lcov && c8 report --reporter=html",
3131
"codecov": "codecov",
3232
"precodecov": "npm run coverage",

0 commit comments

Comments
 (0)