eAPD
eAPD copied to clipboard
[Maintenance] Add Cypress code coverage to Codecov
Description and related issues
We would like to add the code coverage from Cypress to the Codecov tool
This task is done when…
- [ ] integrate Cypress code coverage reports into Codecov
Notes for Tif:
-
https://docs.cypress.io/guides/tooling/code-coverage
-
Only way I was able to get a code coverage report for /web/src/ was when I added this line of code to the babel config file in /web/
-
plugins = ['istanbul']
- However, this breaks the frontend tests. Throws an error about duplicate plugins:
-
-
What hasn't worked:
- Using
plugins = ['istanbul']
only in the /e2e/ babel config. This generates a code coverage report for code only within /e2e/ - Using
plugins = ['istanbul']
only in the root babel config. This doesn't cover any code. - Using nyc:
- Cypress documentation only uses nyc to instrument the code. However, no matter where I put the instrumented code, cypress couldn't see it and didn't generate a report.
- Using
-
Possible solutions:
- Fix duplicate plugin error
- Move Cypress into web? Then the instrumented code would be in the same directory? Not sure if this will work however.