Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support passing reporter options from config #459

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/commands/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ exports.outputReport = async function (argv) {
excludeAfterRemap: argv.excludeAfterRemap,
reporter: Array.isArray(argv.reporter) ? argv.reporter : [argv.reporter],
reportsDirectory: argv['reports-dir'],
reporterOptions: argv.reporterOptions || {},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
reporterOptions: argv.reporterOptions || {},
reporterOptions: argv.reporterOptions ?? {},

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bcoe i used the exiting methods. see

this.reporterOptions = reporterOptions || {}

tempDirectory: argv.tempDirectory,
watermarks: argv.watermarks,
resolve: argv.resolve,
Expand Down
4 changes: 2 additions & 2 deletions test/integration.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ All files | 3.52 | 12.5 | 6.52 | 3.52
source-map-from-file.js | 0 | 0 | 0 | 0 | 1-100
c8/lib/commands | 0 | 0 | 0 | 0 |
check-coverage.js | 0 | 0 | 0 | 0 | 1-70
report.js | 0 | 0 | 0 | 0 | 1-42
report.js | 0 | 0 | 0 | 0 | 1-43
c8/test/fixtures | 30.97 | 37.5 | 21.42 | 30.97 |
async.js | 100 | 100 | 100 | 100 |
c8-ignore-next.js | 54.54 | 0 | 0 | 54.54 | 1,3-4,9,12,17-19,21-22
Expand Down Expand Up @@ -536,7 +536,7 @@ All files | 3.52 | 12.5 | 6.52 | 3.52
source-map-from-file.js | 0 | 0 | 0 | 0 | 1-100
c8/lib/commands | 0 | 0 | 0 | 0 |
check-coverage.js | 0 | 0 | 0 | 0 | 1-70
report.js | 0 | 0 | 0 | 0 | 1-42
report.js | 0 | 0 | 0 | 0 | 1-43
c8/test/fixtures | 30.97 | 37.5 | 21.42 | 30.97 |
async.js | 100 | 100 | 100 | 100 |
c8-ignore-next.js | 54.54 | 0 | 0 | 54.54 | 1,3-4,9,12,17-19,21-22
Expand Down