Ok, so here is the generic way:
- run
jest --coverage
or wrap it as a package.json script and run that - Report is generated, navigate to
coverage/Icov-report
and openindex.html
- you can have an 'open in browser' extension installed, that way you can open it without actually going into files explorer, but by right-clicking the
index.html
and selecting one of the added context menu options.
- you can have an 'open in browser' extension installed, that way you can open it without actually going into files explorer, but by right-clicking the
I have not found a better out-of-the-box way to do it. My improved version is in the answers.