Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Count Babel tests towards Babylon code coverage #182

Merged
merged 4 commits into from
Nov 9, 2016

Conversation

motiz88
Copy link
Contributor

@motiz88 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
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
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
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.

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