How to instrument react-scripts web application for code coverage

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Awesome stuff! I've set up the same for custom webpack build and it works just great!

TheRavageFang
Автор

What if I don't want to create a new repository (instrument-example), but add it to an existing project which i need to add code coverage?

gbilck
Автор

Just dropping a quick tip for anyone that is using craco instead of cra to start the project. Doing something like:

"start:instrumented": "craco -r @cypress/instrument-cra start"

will also work, they are compatible.

matheusmarabesi
Автор

i did all the steps yet the window.__coverage__ object is undefined.
i am using playwright for my e2e tests and i want my src code to be instrumented to generate code coverage using istanbul.

irtezakhan
Автор

Thanks, quick question: is there a way to export a cobertura xml from the window coverage ? Or a simple way to produce a more readable test report from that json?

giuliocasa
Автор

What if the app is in different repository

rahul.shukla
visit shbcf.ru