Skip to content

Commit 913e556

Browse files
authored
Add --coverage option to build scripts for tests (#54499)
1 parent e8c7927 commit 913e556

File tree

7 files changed

+448
-21
lines changed

7 files changed

+448
-21
lines changed

.c8rc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"reporter": ["lcovonly", "cobertura"],
3+
"src": "src",
4+
"include": ["src/**", "built/local/**"],
5+
"exclude": ["**/node_modules/**"],
6+
"mergeAsync": true
7+
}

Herebyfile.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ export const runTests = task({
577577
// task("runtests").flags = {
578578
// "-t --tests=<regex>": "Pattern for tests to run.",
579579
// " --failed": "Runs tests listed in '.failed-tests'.",
580+
// " --coverage": "Generate test coverage using c8",
580581
// "-r --reporter=<reporter>": "The mocha reporter to use.",
581582
// "-i --break": "Runs tests in inspector mode (NodeJS 8 and later)",
582583
// " --keepFailed": "Keep tests in .failed-tests even if they pass",
@@ -714,6 +715,7 @@ export const runTestsParallel = task({
714715
});
715716

716717
// task("runtests-parallel").flags = {
718+
// " --coverage": "Generate test coverage using c8",
717719
// " --light": "Run tests in light mode (fewer verifications, but tests run faster).",
718720
// " --keepFailed": "Keep tests in .failed-tests even if they pass.",
719721
// " --dirty": "Run tests without first cleaning test output directories.",

0 commit comments

Comments
 (0)