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

Conversation

Projects
None yet
4 participants
@coreyfarrell
Copy link
Contributor

commented Apr 9, 2019

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.

build: Update scripts/mapCoverage.js to not use istanbul-api.
Begin migration away from the to-be-deprecated istanbul-api.

Ref istanbuljs/istanbuljs#321
@facebook-github-bot

This comment has been minimized.

Copy link

commented Apr 9, 2019

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 cla@fb.com. Thanks!

@SimenB

This comment has been minimized.

Copy link
Collaborator

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?

import {createReporter} from 'istanbul-api';

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

@facebook-github-bot

This comment has been minimized.

Copy link

commented Apr 9, 2019

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

@coreyfarrell

This comment has been minimized.

Copy link
Contributor Author

commented Apr 9, 2019

@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

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link

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.

coreyfarrell and others added some commits Apr 9, 2019

@SimenB

This comment has been minimized.

Copy link
Collaborator

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

SimenB added some commits Apr 22, 2019

@SimenB SimenB merged commit f3e3d9f into facebook:master Apr 22, 2019

11 checks passed

ci/circleci: lint-and-typecheck Your tests passed on CircleCI!
Details
ci/circleci: test-browser Your tests passed on CircleCI!
Details
ci/circleci: test-jest-circus Your tests passed on CircleCI!
Details
ci/circleci: test-node-10 Your tests passed on CircleCI!
Details
ci/circleci: test-node-11 Your tests passed on CircleCI!
Details
ci/circleci: test-node-6 Your tests passed on CircleCI!
Details
ci/circleci: test-node-8 Your tests passed on CircleCI!
Details
ci/circleci: test-or-deploy-website Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
facebook.jest #20190422.29 succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.