Mutare.Report.Html (mutare v0.1.2)

Copy Markdown View Source

Renders an HTML page that hosts the interactive mutation report.

Deliberately not a bespoke renderer: it embeds the Mutare.Report.Json document into the official mutation-test-report-app web component (loaded from a pinned CDN bundle), which renders the file tree, per-file source with inline mutant annotations, and the score. The report data is embedded in one HTML file you can open or attach to CI.

Tradeoff: viewing the page fetches the component bundle from unpkg, so it needs network access. Vendoring the bundle is a possible later toggle.

Summary

Functions

Render an HTML report. opts is forwarded to Mutare.Report.Json (so :min_score sets the thresholds the viewer colours by).

Functions

render(results, sources, opts \\ [])

@spec render([Mutare.Result.t()], %{optional(String.t()) => String.t()}, keyword()) ::
  String.t()

Render an HTML report. opts is forwarded to Mutare.Report.Json (so :min_score sets the thresholds the viewer colours by).