-
Notifications
You must be signed in to change notification settings - Fork 819
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(test): fix failing tests by preventing source-map generation #3642
fix(test): fix failing tests by preventing source-map generation #3642
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3642 +/- ##
==========================================
+ Coverage 93.52% 93.72% +0.19%
==========================================
Files 271 274 +3
Lines 7496 8058 +562
Branches 1521 1670 +149
==========================================
+ Hits 7011 7552 +541
- Misses 485 506 +21
|
59c3b76
to
b913b24
Compare
Are we sure this doesn't affect coverage? |
nyc is instrumenting the code (e.g. all ifs/functions to check if they are entered) therefore line numbers,.. may change. I would assume impact to code coverage results but it seems there is none if I look into the above posted results. |
I ran it locally and it did not affect coverage generated after a clean build:
I think
I have to admit I'm not sure how it maps its instrumented code to the actual line numbers though (I would also assume I was not able to find reliable documentation about this option, so I had to rely on trial and error to come up with this solution. |
Looking into the PR which added this option I would assume we are safe. It seems to be related to mapping of stack traces not coverage results. |
Which problem is this PR solving?
Windows tests are currently running out of heap space, which seems to be related to source map merging. As far as I can tell, we're already generating source maps for the browser/webworker tests, and using ts-mocha already provides us with source-maps. While investigating #3628, I found that the merging of source maps (persumably merging the existing ones and the ones generated by nyc/istanbul) is what allocates a lot of memory. This PR disables the generation of source maps and reduces the amount of memory used significantly from >3.9GB to 174MB
Fixes #3628
Short description of the changes
Prevent source map generation by
nyc
Type of change
How Has This Been Tested?
Maximum resident set size
produced bytime -v
)