Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some changes were done to the
jest-phabricator
result processor; both for optimizing the size of the resulting JSON and for making the results shape more consistent. This is a summary on how the changes affect the current way of working of the plugin:The additional level of indirection where all the results were copied inside
aggregatedResult
is gone. This way, the resulting data format is the same whether you usejest-phabricator
or not.Now we override
coverageMap
to place the coverage there. The standard coverage format is huge, and although the code said we will not include it in the final result for performance reasons, it was getting preserved insideaggregatedResult.coverageMap
.Coverage is not copied in each of the test results anymore, saving a lot of space. Together with the previous point, this means a decrease from 4.57 MiB to 763.75 KiB for the resulting JSON size on a ~800 tests run. That's 6x smaller!
One might argue that overriding
coverageMap
is bad, because we lose the original coverage information; however:null
-ified before on the main object to save space (which was not, because it was still in theaggregatedResult
sublevel), but still, its value wasnull
at the root.Code is simpler. Yay!