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

Improve Jest phabricator plugin #4195

Merged
merged 1 commit into from
Aug 4, 2017
Merged

Improve Jest phabricator plugin #4195

merged 1 commit into from
Aug 4, 2017

Conversation

mjesun
Copy link
Contributor

@mjesun mjesun commented Aug 4, 2017

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:

  1. 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 use jest-phabricator or not.

  2. 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 inside aggregatedResult.coverageMap.

  3. 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!

  4. One might argue that overriding coverageMap is bad, because we lose the original coverage information; however:

    • It was intentionally null-ified before on the main object to save space (which was not, because it was still in the aggregatedResult sublevel), but still, its value was null at the root.
    • Being at a non-standard place, no one complained for a lot of time, so probably it was not getting used.
    • If a custom reporter is being used for coverage purposes, probably you're not looking for the default way of reporting coverage either, so putting it where the usual coverage is, sounds reasonable to me.
  5. Code is simpler. Yay!

@cpojer cpojer merged commit e2c2604 into jestjs:master Aug 4, 2017
@cpojer
Copy link
Member

cpojer commented Aug 4, 2017

Great!!

tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
@mjesun mjesun deleted the phabricator branch December 6, 2017 11:47
@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants