OriginalFileCoverage Class#
Coverage attributed to an original (pre-bundle) source file resolved through a JavaScript/CSS source map. Populated when a generated asset references a parseable source map; otherwise the asset's coverage is reported only via ScriptCoverage / StylesheetCoverage.
public sealed record OriginalFileCoverage : System.IEquatable<Motus.Abstractions.OriginalFileCoverage>
Inheritance System.Object → OriginalFileCoverage
Implements System.IEquatable<OriginalFileCoverage>
Constructors#
OriginalFileCoverage(string, string, IReadOnlyList<CoverageRange>, FileCoverageStats) Constructor#
Coverage attributed to an original (pre-bundle) source file resolved through a JavaScript/CSS source map. Populated when a generated asset references a parseable source map; otherwise the asset's coverage is reported only via ScriptCoverage / StylesheetCoverage.
public OriginalFileCoverage(string OriginalPath, string? OriginalSource, System.Collections.Generic.IReadOnlyList<Motus.Abstractions.CoverageRange> Ranges, Motus.Abstractions.FileCoverageStats Stats);
Parameters#
OriginalPath System.String
The original source path as it appears in the source map's sources array
(e.g. webpack:///./src/Login.ts or file:///.../Login.ts).
OriginalSource System.String
The original source text from the map's sourcesContent array, when present.
Ranges System.Collections.Generic.IReadOnlyList<CoverageRange>
Sorted, non-overlapping covered ranges with execution counts, in offsets within OriginalSource (or line markers when no source content is available).
Stats FileCoverageStats
Line-level coverage stats derived from Ranges.
Properties#
OriginalPath Property#
The original source path as it appears in the source map's sources array
(e.g. webpack:///./src/Login.ts or file:///.../Login.ts).
public string OriginalPath { get; init; }
Property Value#
OriginalSource Property#
The original source text from the map's sourcesContent array, when present.
public string? OriginalSource { get; init; }
Property Value#
Ranges Property#
Sorted, non-overlapping covered ranges with execution counts, in offsets within OriginalSource (or line markers when no source content is available).
public System.Collections.Generic.IReadOnlyList<Motus.Abstractions.CoverageRange> Ranges { get; init; }
Property Value#
System.Collections.Generic.IReadOnlyList<CoverageRange>
Stats Property#
Line-level coverage stats derived from Ranges.
public Motus.Abstractions.FileCoverageStats Stats { get; init; }