-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
test_runner: ignore unmapped lines for coverage #55162
Conversation
Review requested:
|
5dc8328
to
8f1b69f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #55162 +/- ##
==========================================
+ Coverage 88.24% 88.40% +0.16%
==========================================
Files 651 652 +1
Lines 183836 186578 +2742
Branches 35827 36043 +216
==========================================
+ Hits 162218 164941 +2723
- Misses 14916 14919 +3
- Partials 6702 6718 +16
|
Can you add a test? Without a test, it's unclear what this change accomplished / fixed |
f34e3aa
to
a5b8a67
Compare
I'm not sure which tests to add. Do you have any suggestions? For now, I updated the existing one adjusting the coverage report to meet the expectation. |
a5b8a67
to
486fdec
Compare
76f2fd2
to
2dfe987
Compare
2dfe987
to
6222f87
Compare
IMHO I'm not sure how I feel about this change. It breaks the existing tests (as they required modification), and IIUC those tests are valid before this change. Can you provide more information about this change? Such as the motivation, and how the changed tests are more accurate? Just looking at the files, they contain uncovered lines, which this PR does not account for. So, -1 from me. |
If we take the repro steps provided in the issue we can see the coverage report considering, to calculate the line coverage, lines that are present in TS files but not in the transpiled JS. Evidenceimport type {} from "node:assert";
console.log("Hi"); This TS will generate the following JS console.log("Hi");
export {};
//# sourceMappingURL=a.mjs.map There's no mapping pointing to the If I understood correctly, when collecting coverage from That's what this change does. It walks through mappings and ignores those lines. Coverage report before this change
Coverage report after this change
|
This may fix that issue, however I'm concerned that it breaks existing tests. |
I see If this PR reaches the expected behavior, should we update those tests then? If that makes sense, and you can point me to those tests, I can work on them. |
Co-authored-by: Aviv Keller <[email protected]>
Closing this in favor of #55228 |
Refs: #54753