refactor(kpi): K4/K10/K12 review fixups — test data-race + faulted-tick liveness, dead-branch/unused removal, NaN-guard assertions, value clamp + doc
This commit is contained in:
+12
-2
@@ -106,7 +106,12 @@ public class KpiTrendChartTests : BunitContext
|
||||
.Add(c => c.Title, "Flat Time")
|
||||
.Add(c => c.IsAvailable, true));
|
||||
|
||||
Assert.Contains("<polyline", cut.Markup);
|
||||
var markup = cut.Markup;
|
||||
Assert.Contains("<polyline", markup);
|
||||
// The even-spacing fallback must produce finite coordinates — no NaN or Infinity
|
||||
// from the divide-by-zero guard path.
|
||||
Assert.DoesNotContain("NaN", markup);
|
||||
Assert.DoesNotContain("Infinity", markup);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -123,7 +128,12 @@ public class KpiTrendChartTests : BunitContext
|
||||
.Add(c => c.Title, "Quiet")
|
||||
.Add(c => c.IsAvailable, true));
|
||||
|
||||
Assert.Contains("<polyline", cut.Markup);
|
||||
var markup = cut.Markup;
|
||||
Assert.Contains("<polyline", markup);
|
||||
// The zero-max flat-line guard must produce finite coordinates — no NaN or Infinity
|
||||
// from the yFrac divide-by-zero protection path.
|
||||
Assert.DoesNotContain("NaN", markup);
|
||||
Assert.DoesNotContain("Infinity", markup);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
||||
Reference in New Issue
Block a user