This repository has been archived by the owner. It is now read-only.

Count Babel tests towards Babylon code coverage #182

merged 4 commits into from Nov 9, 2016


None yet
3 participants
Copy link

motiz88 commented Oct 15, 2016

As we're already running Babel's tests in CI to detect any integration issues early, we can also use them to meaningfully bump up Babylon's test coverage, by doing this with an instrumented build of Babylon and using codecov's automatic report merging feature.

In practice this currently helps us cover things like do expressions and the :: operator which are conspicuously uncovered in the current master. Obviously for new features the ideal still is to add covering tests from the get-go.

(Also, file this under "workarounds we can retire if Babylon is ever merged back into the Babel monorepo" 馃槈)


This comment has been minimized.

Copy link

codecov-io commented Oct 15, 2016

Current coverage is 96.14% (diff: 100%)

Merging #182 into master will increase coverage by 1.56%

@@             master       #182   diff @@
  Files            19         19          
  Lines          3189       3189          
  Methods         333        333          
  Messages          0          0          
  Branches        839        839          
+ Hits           3016       3066    +50   
+ Misses           94         60    -34   
+ Partials         79         63    -16   

Powered by Codecov. Last update 394c954...3c64365


This comment has been minimized.

Copy link

danez commented Oct 16, 2016

Do you think it is okay now that the babel tests are only running on the latest node version? I'm not sure if it should stay like it is or run on all supported node version now that we count it towards the coverage.


This comment has been minimized.

Copy link
Contributor Author

motiz88 commented Oct 16, 2016

@danez I think it's fine as is, if these assumptions hold (and I think they do):

  1. We only care about hit/miss/partial stats - # of hits per line is irrelevant;
  2. We run all the Babel tests at least once;
  3. Babel's parsing needs are independent of the version of Node it runs on.

@danez danez merged commit 6cb0235 into babel:master Nov 9, 2016

3 checks passed

codecov/patch Coverage not affected when comparing 394c954...3c64365
codecov/project 96.14% (+1.56%) compared to 394c954
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.