Ensure DEB chart path covers full day

This commit is contained in:
2569718930@qq.com
2026-05-17 19:34:42 +08:00
parent 1ab10a9c90
commit 38ac9844c1
2 changed files with 34 additions and 7 deletions
@@ -69,6 +69,15 @@ export function runTests() {
ankaraChartData?.datasets.debSeries.some((point) => point.labelTime === "13:00"),
"Ankara chart should build the DEB original path from MGM hourly data when Open-Meteo hourly is unavailable",
);
assert(
ankaraChartData?.datasets.debSeries.length === 48,
"DEB original path must cover the full 00:00-23:30 chart day even when city hourly data is partial",
);
assert(
ankaraChartData?.datasets.debSeries.some((point) => point.labelTime === "00:00") &&
ankaraChartData?.datasets.debSeries.some((point) => point.labelTime === "23:30"),
"DEB original path must include both start-of-day and end-of-day points",
);
assert(
ankaraChartData?.datasets.calibratedFutureSeries.length,
"Ankara chart should still expose a calibrated path when observation points exist",