shlogg · Early preview
Jetthoughts Dev @jetthoughts

Combining System And Unit Test Coverage With Codecov

Here's the summary of the blog post in 250 characters: "Combine system & unit tests for code coverage! Use Istanbul Instrumenter Loader for JS code, extract coverage from browser, aggregate with nyc & send to Codecov.

Having JavaScript code covered by Capybara system tests, can we utilize them for the code coverage collecting and get the aggregated result with the coverage from the unit tests?


We want to be sure that all code responsible for key user journey scenarios of our app is covered with tests.
For example, there is a Ruby on Rails application that uses Webpacker and has JavaScript files that are covered by the system tests. Capybara is used as the system testing tool.

How to get code coverage combining the results of system and unit tests?

  
  
  Inject getting coverage for JavaScript code

For...