Merge pull request #1553 from nasa/time-api-redo

[Time API] V1.0 Time API and associated refactoring
This commit is contained in:
Pete Richards
2017-05-01 17:11:19 -07:00
committed by GitHub
66 changed files with 2268 additions and 2491 deletions

View File

@@ -98,7 +98,7 @@ define(
mockAPI = {
telemetry: mockTelemetryAPI,
conductor: {
time: {
bounds: function () {
return {
start: 0,
@@ -107,9 +107,7 @@ define(
},
timeSystem: function () {
return {
metadata: {
key: 'mockTimeSystem'
}
key: 'mockTimeSystem'
};
}
}
@@ -289,7 +287,7 @@ define(
it("applies time conductor bounds if request bounds not defined", function () {
var fullRequest = telemetry.buildRequest({});
var mockBounds = mockAPI.conductor.bounds();
var mockBounds = mockAPI.time.bounds();
expect(fullRequest.start).toBe(mockBounds.start);
expect(fullRequest.end).toBe(mockBounds.end);
@@ -302,8 +300,8 @@ define(
it("applies domain from time system if none defined", function () {
var fullRequest = telemetry.buildRequest({});
var mockTimeSystem = mockAPI.conductor.timeSystem();
expect(fullRequest.domain).toBe(mockTimeSystem.metadata.key);
var mockTimeSystem = mockAPI.time.timeSystem();
expect(fullRequest.domain).toBe(mockTimeSystem.key);
fullRequest = telemetry.buildRequest({domain: 'someOtherDomain'});
expect(fullRequest.domain).toBe('someOtherDomain');