feat(data-plane): add bounded Gelios telemetry contract
This commit is contained in:
@@ -95,6 +95,15 @@ assert.equal(Object.isFrozen(strict.fieldContracts), true);
|
||||
assert.equal(Object.isFrozen(strict.fieldContracts.signal_state), true);
|
||||
assert.equal(Object.isFrozen(strict.fieldContracts.signal_state.enum), true);
|
||||
|
||||
const telemetry = normalizeDataProductDefinition({
|
||||
...input,
|
||||
fields: ["sensor_readings"],
|
||||
fieldContracts: {
|
||||
sensor_readings: { type: "telemetry_readings", required: false },
|
||||
},
|
||||
});
|
||||
assert.equal(telemetry.fieldContracts.sensor_readings.type, "telemetry_readings");
|
||||
|
||||
assert.throws(
|
||||
() => normalizeDataProductDefinition({
|
||||
...input,
|
||||
|
||||
Reference in New Issue
Block a user