refactor: stabilize cumulative mileage metrics

This commit is contained in:
kkfluous
2026-08-07 15:56:39 +08:00
parent 8c6a3ad831
commit 686fc4e2e2
6 changed files with 50 additions and 6 deletions
+4
View File
@@ -19,6 +19,10 @@ test('lists mileage metrics without exposing the catalog array', () => {
assert.ok(metrics.length >= 5);
assert.notEqual(metrics, METRIC_CATALOG);
assert.ok(metrics.every(metric => metric.domain === 'mileage'));
assert.equal(
metrics.find(metric => metric.id === 'mileage.cumulative_odometer_sum')?.timeSemantics,
'snapshot',
);
});
test('publishes hydrogen cost, revenue, and gross profit as separate metrics', () => {