mirror of
https://github.com/nasa/openmct.git
synced 2025-04-21 09:31:24 +00:00
[Limits] Test exposure of datum
...which will be used to evaluate limits.
This commit is contained in:
parent
258c5d95e6
commit
14c5a817a7
@ -243,6 +243,26 @@ define(
|
||||
subscription.unsubscribe();
|
||||
expect(mockUnlisten).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("provides telemetry as datum objects", function () {
|
||||
var testDatum = { a: 1, b: 13, c: 42, d: -1977 };
|
||||
|
||||
function lookup(index, key) {
|
||||
return testDatum[key];
|
||||
}
|
||||
|
||||
mockSeries.getDomainValue.andCallFake(lookup);
|
||||
mockSeries.getRangeValue.andCallFake(lookup);
|
||||
|
||||
testMetadata.domains = [ { key: 'a' }, { key: 'b'} ];
|
||||
testMetadata.ranges = [ { key: 'c' }, { key: 'd'} ];
|
||||
|
||||
mockTelemetry.subscribe.mostRecentCall.args[0](mockSeries);
|
||||
mockTimeout.mostRecentCall.args[0]();
|
||||
|
||||
expect(subscription.getDatum(mockDomainObject))
|
||||
.toEqual(testDatum);
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user