refactor: expose electric data freshness
This commit is contained in:
@@ -31,15 +31,16 @@ test('publishes hydrogen cost, revenue, and gross profit as separate metrics', (
|
||||
assert.equal(byId.get('hydrogen.customer_order_gross_profit')?.aggregation, 'derived');
|
||||
});
|
||||
|
||||
test('publishes electric fee components and blended cost semantics', () => {
|
||||
test('publishes electric fee components, blended cost, and freshness semantics', () => {
|
||||
const metrics = listMetricDefinitions('electric');
|
||||
const byId = new Map(metrics.map(metric => [metric.id, metric]));
|
||||
|
||||
assert.ok(metrics.length >= 6);
|
||||
assert.ok(metrics.length >= 7);
|
||||
assert.equal(byId.get('electric.charge_total_fee')?.formula, 'SUM(fee)');
|
||||
assert.equal(byId.get('electric.electricity_fee')?.formula, 'SUM(e_fee)');
|
||||
assert.equal(byId.get('electric.service_fee')?.formula, 'SUM(service_fee)');
|
||||
assert.equal(byId.get('electric.blended_cost_intensity')?.aggregation, 'weighted-ratio');
|
||||
assert.equal(byId.get('electric.data_freshness')?.timeSemantics, 'freshness');
|
||||
});
|
||||
|
||||
test('publishes ETC passage and billing metrics as separate grains', () => {
|
||||
|
||||
Reference in New Issue
Block a user