Docs · API reference · Motus.Abstractions

ScriptCoverage Class#

JavaScript coverage data for a single script URL, aggregated across all sessions.

public sealed record ScriptCoverage : System.IEquatable<Motus.Abstractions.ScriptCoverage>

Inheritance System.Object → ScriptCoverage

Implements System.IEquatable<ScriptCoverage>

Constructors#

ScriptCoverage(string, string, IReadOnlyList<CoverageRange>, FileCoverageStats) Constructor#

JavaScript coverage data for a single script URL, aggregated across all sessions.

public ScriptCoverage(string Url, string Source, System.Collections.Generic.IReadOnlyList<Motus.Abstractions.CoverageRange> Ranges, Motus.Abstractions.FileCoverageStats Stats);

Parameters#

Url System.String

The script URL (or script ID when no URL is available).

Source System.String

Full script source text used to compute line-level coverage.

Ranges System.Collections.Generic.IReadOnlyList<CoverageRange>

Sorted, non-overlapping covered ranges with execution counts.

Stats FileCoverageStats

Line-level coverage stats derived from Ranges and Source.

Properties#

Ranges Property#

Sorted, non-overlapping covered ranges with execution counts.

public System.Collections.Generic.IReadOnlyList<Motus.Abstractions.CoverageRange> Ranges { get; init; }

Property Value#

System.Collections.Generic.IReadOnlyList<CoverageRange>

Source Property#

Full script source text used to compute line-level coverage.

public string Source { get; init; }

Property Value#

System.String

Stats Property#

Line-level coverage stats derived from Ranges and Source.

public Motus.Abstractions.FileCoverageStats Stats { get; init; }

Property Value#

FileCoverageStats

Url Property#

The script URL (or script ID when no URL is available).

public string Url { get; init; }

Property Value#

System.String