Function toHtml

Convert a CoveredFile struct to html

string toHtml (
  CoveredFile coveredFile
);

Example

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"`);

Example

Check if the table body is inserted

indexTable("some content").should.contain(`<tbody>some content</tbody>`);