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

Count Babel tests towards Babylon code coverage #182

Merged
merged 4 commits into from Nov 9, 2016

Conversation

Projects
None yet
3 participants
@motiz88
Copy link
Contributor

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" 馃槈)

@codecov-io

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

@danez

This comment has been minimized.

Copy link
Member

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.

@motiz88

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
Details
codecov/project 96.14% (+1.56%) compared to 394c954
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.