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

Stop using istanbul-api #8294

Merged
merged 9 commits into from
Apr 22, 2019
Merged

Stop using istanbul-api #8294

merged 9 commits into from
Apr 22, 2019

Conversation

coreyfarrell
Copy link
Contributor

Summary

I plan to deprecate istanbul-api after the current semver-major. Switching jest's own test coverage reporting was the easier first step to making this switch so I've done this first.

Test plan

I first ran yarn && yarn test-ci on the existing master branch. I encountered errors with hg tests so I manually ran node scripts/mapCoverage.js after. I then made a backup of the coverage folder, ran rm -fr coverage/lcov*, then ran node scripts/mapCoverage.js with my updates. I verified that timestamps in the HTML reports were the only thing to change before/after my change.

Begin migration away from the to-be-deprecated istanbul-api.

Ref istanbuljs/istanbuljs#321
@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@SimenB
Copy link
Member

SimenB commented Apr 9, 2019

Thanks @coreyfarrell!

This just updates what Jest uses during its own test runs. Could you also update the reporter jest uses in the normal case?

https://github.com/facebook/jest/blob/06842633c42580607874430f47b858359967d4ee/packages/jest-reporters/src/coverage_reporter.ts#L15

(and delete the vendored .d.ts file we have for istanbul-api 🙂)

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@coreyfarrell
Copy link
Contributor Author

@SimenB yes that'll be next. Just wanted to start with something that was easier to test. I'll be AFK for a couple hours I'll try to work on the production reporter later today.

@SimenB
Copy link
Member

SimenB commented Apr 9, 2019

Perfect! Our own coverage run is ci/circleci: test-node-10, so if that's green then this first one worked great 🙂 When changing the jest reporter, every test run will test it since we have integration tests

@codecov-io
Copy link

codecov-io commented Apr 9, 2019

Codecov Report

Merging #8294 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8294      +/-   ##
==========================================
+ Coverage   62.22%   62.24%   +0.02%     
==========================================
  Files         266      266              
  Lines       10720    10719       -1     
  Branches     2609     2607       -2     
==========================================
+ Hits         6670     6672       +2     
+ Misses       3463     3462       -1     
+ Partials      587      585       -2
Impacted Files Coverage Δ
packages/jest-reporters/src/coverage_reporter.ts 61.53% <100%> (+1.99%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65b48a7...4411299. Read the comment docs.

@SimenB
Copy link
Member

SimenB commented Apr 22, 2019

CI passed! 🎉 I'll figure out what parts to keep from the deleted test and merge this. Thanks @coreyfarrell!

@SimenB SimenB changed the title Stop using istanbul-api for test-ci coverage reporting. Stop using istanbul-api Apr 22, 2019
@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 11, 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.

4 participants