Skip to content

Instantly share code, notes, and snippets.

@kohlikohl
kohlikohl / script.js
Last active September 27, 2023 08:41
Fix VSTS code coverage reporting by inlining CSS
let fs = require("fs-jetpack"),
path = require("path"),
inline = require("inline-css");
// This inlines the css of the HTML coverage output as VSTS
// strips all external CSS files
const CODE_COVERAGE_DIRECTORY = "./coverage";
const files = fs.find(CODE_COVERAGE_DIRECTORY, { matching: "*.html" });