Example of using puppeteer-to-istanbul to output puppeteer format coverage output in Istanbul format.
index.html: an HTML file containing inline JavaScript.index.js: a script that executesindex.htmlwith coverage enabled.
npm run coverage
This will:
- run JavaScript in puppeteer with coverage enabled.
- output to disk in Istanbul format.
- run reports with nyc.
- open
coverage/index.html, displaying the coverage information collected.