mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 13:17:53 +00:00
[Spec] Update API mock
Update telemetry api mock to return proper value formatters.
This commit is contained in:
parent
5db03bb1bd
commit
2b41321c03
@ -101,7 +101,21 @@ define(
|
||||
]);
|
||||
mockTelemetryAPI.commonValuesForHints.andReturn([]);
|
||||
mockTelemetryAPI.request.andReturn(Promise.resolve([]));
|
||||
|
||||
mockTelemetryAPI.getValueFormatter.andCallFake(function (metadata) {
|
||||
var formatter = jasmine.createSpyObj(
|
||||
'telemetryFormatter:' + metadata.key,
|
||||
[
|
||||
'format',
|
||||
'parse'
|
||||
]
|
||||
);
|
||||
var getter = function (datum) {
|
||||
return datum[metadata.key];
|
||||
};
|
||||
formatter.format.andCallFake(getter);
|
||||
formatter.parse.andCallFake(getter);
|
||||
return formatter;
|
||||
});
|
||||
|
||||
mockTelemetryAPI.canProvideTelemetry.andReturn(false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user