toHtml

Convert a CoveredFile struct to html

string
toHtml

Examples

Check variables for the coverage html

CoveredFile coveredFile;
coveredFile.moduleName = "module.name";
coveredFile.coveragePercent = 30;
coveredFile.path = "a/b";
coveredFile.lines = [ LineCoverage("       0| <not code>"), LineCoverage("    1| some code") ];

auto html = toHtml(coveredFile);

html.should.contain(`<h1>module.name`);
html.should.contain(`&lt;not code&gt;`);
html.should.contain(`<title>module.name coverage</title>`);
html.should.contain(`hit"`);

Meta