fix: decouple mileage KPIs from sorting

This commit is contained in:
kkfluous
2026-08-07 18:44:49 +08:00
parent c0d504cb7b
commit 559094cdc5
7 changed files with 123 additions and 18 deletions
+4
View File
@@ -23,6 +23,10 @@ test('lists mileage metrics without exposing the catalog array', () => {
metrics.find(metric => metric.id === 'mileage.cumulative_odometer_sum')?.timeSemantics,
'snapshot',
);
assert.equal(
metrics.find(metric => metric.id === 'mileage.average_per_vehicle')?.formula,
'mileage.period_total / NULLIF(mileage.vehicle_count, 0)',
);
});
test('publishes hydrogen cost, revenue, and gross profit as separate metrics', () => {