Skip to content

Instantly share code, notes, and snippets.

@superfein
superfein / coverageCSS.js
Created March 30, 2019 23:13
Uses the Puppeteer node module to extract the coverage CSS from Chrome, for a specific URL.
const puppeteer = require('puppeteer');
// Include to be able to export files with node
const fs = require('fs');
// This prepares the filenames for the coverage .css files
function exportCSSFileName(url) {
// Remove https:// from the beginning of the string
// Remove .css* from the end of the string