How to read code coverage report

preview_player
Показать описание
We will look at code coverage HTML report generated after Cypress test run, and I will explain the line counters, if/else branching and JSX coverage.
Рекомендации по теме
Комментарии
Автор

Thanks Gleb for explaining and I totally get it. But then isn't the coverage kind of superficial? I know it cannot be covered completely due to code transpilers. I would also like to test the fact that e.g. from the JSX I expect 3 menu items, and if one is missing it is a broken test case. I know I can do this using Cypress, but the fact that it will have 0 impact on my code coverage gives an uneasy feeling. How to we cover this gray area? Unit test ? I really believe Cypress can be a one wholesome solution for testing but would like to cover these real world scenarios as well.

soulv
visit shbcf.ru