2014-12-02 03:45:23 +00:00
|
|
|
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/
|
|
|
|
|
|
|
|
define(
|
2014-12-24 19:39:29 +00:00
|
|
|
["../src/TelemetryFormatter"],
|
|
|
|
function (TelemetryFormatter) {
|
2014-12-02 03:45:23 +00:00
|
|
|
"use strict";
|
|
|
|
|
2014-12-24 19:39:29 +00:00
|
|
|
describe("The telemetry formatter", function () {
|
2014-12-02 18:11:46 +00:00
|
|
|
var formatter;
|
|
|
|
|
|
|
|
beforeEach(function () {
|
2014-12-24 19:39:29 +00:00
|
|
|
formatter = new TelemetryFormatter();
|
2014-12-02 18:11:46 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("formats domains using YYYY-DDD style", function () {
|
|
|
|
expect(formatter.formatDomainValue(402513731000)).toEqual(
|
|
|
|
"1982-276 17:22:11"
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("formats ranges as values", function () {
|
2014-12-24 19:39:29 +00:00
|
|
|
expect(formatter.formatRangeValue(10)).toEqual("10.000");
|
2014-12-02 18:11:46 +00:00
|
|
|
});
|
2014-12-02 03:45:23 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
);
|