-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix: coverage summary reporting #7058
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7058 +/- ##
==========================================
+ Coverage 66.66% 66.67% +<.01%
==========================================
Files 253 253
Lines 10597 10597
Branches 4 3 -1
==========================================
+ Hits 7065 7066 +1
+ Misses 3531 3530 -1
Partials 1 1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test for that?
) { | ||
coverageReporters = coverageReporters.concat(['text-summary']); | ||
if (!this._globalConfig.useStderr && coverageReporters.length < 1) { | ||
coverageReporters = coverageReporters.push('text-summary'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assignment is not necessary as push mutates the array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. Forgot to delete the assignment when I changed to push instead of concat
You could probably write an integration test for this and do a snapshot on stdout. |
Yeah, an integration test would be nice 🙂 |
@@ -94,12 +94,8 @@ export default class CoverageReporter extends BaseReporter { | |||
} | |||
|
|||
let coverageReporters = this._globalConfig.coverageReporters || []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI wants this to be const
now
How do I do that? There doesn't seem to be an easy to follow guide for that. (also, the wiki is turned on in this repo but unused. maybe it should be turned off?) |
If you look in the e2e directory, we have a bunch of directories. They're all integration tests. In the Contributions to CONTRIBUTING.md with details would be greatly appreciated |
updated with more testing and snapshots |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Can you update the changelog as well?
That's not automatically done? how do I know what version this change will go in as? |
Nope
Put it under |
Prevent text-summary from always being displayed when covereage is configured. The reporters the configuration specifies should be used. If no reporters are specified, then add the default text-summary.
Updated |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Prevent text-summary from always being displayed when covereage is
configured. The reporters the configuration specifies should be used.
If no reporters are specified, then add the default text-summary.
Fixes #7048
Test plan
Not really sure how to write tests for this.