I'm a little bit stuck with a task that I have been researching. It's about code coverage in a react webapp.
I implemented a few unit tests using jest + enzyme. also some functional test, using cucumber to get gherkin features and puppeteer for browser automation.
I have able to get the coverage from the code built by webpack and served on my localhost using puppeteer and istanbul through functional tests. Also, I get code coverage from unit test using jest (btw, it include istanbul to do that).
The problem is: I feel those are two diferents metrics, because I test components with jest + enzyme file by file, and in the other hand, I have code coverage from puppeteer that actually is a single built js file.
The goal should be get code coverage from unit tests and functional tests.
So, my questions are:
has sense, mesure the code coverage on unit tests and functional tests?
has sense, merge code coverage from unit tests and functional tests? and if has sense how to do that?
what is the best aproach to get code coverage from a webapp?