mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 16:36:13 +00:00
f63038a83f
Move spec for formatting of telemetry values from the plot bundle to the telemetry bundle, to reflect its exposure as a reusable service exposed by that bundle. WTD-599.
29 lines
817 B
JavaScript
29 lines
817 B
JavaScript
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/
|
|
|
|
/**
|
|
* MergeModelsSpec. Created by vwoeltje on 11/6/14.
|
|
*/
|
|
define(
|
|
["../src/TelemetryFormatter"],
|
|
function (TelemetryFormatter) {
|
|
"use strict";
|
|
|
|
describe("The telemetry formatter", function () {
|
|
var formatter;
|
|
|
|
beforeEach(function () {
|
|
formatter = new TelemetryFormatter();
|
|
});
|
|
|
|
it("formats domains using YYYY-DDD style", function () {
|
|
expect(formatter.formatDomainValue(402513731000)).toEqual(
|
|
"1982-276 17:22:11"
|
|
);
|
|
});
|
|
|
|
it("formats ranges as values", function () {
|
|
expect(formatter.formatRangeValue(10)).toEqual("10.000");
|
|
});
|
|
});
|
|
}
|
|
); |