mirror of
https://github.com/nasa/openmct.git
synced 2025-06-20 08:03:49 +00:00
[Time Conductor] Update failing specs
WTD-1515
This commit is contained in:
@ -45,7 +45,9 @@ define(
|
|||||||
// Verify precondition: Not called at throttle-time
|
// Verify precondition: Not called at throttle-time
|
||||||
expect(mockTimeout).not.toHaveBeenCalled();
|
expect(mockTimeout).not.toHaveBeenCalled();
|
||||||
expect(throttled()).toEqual(mockPromise);
|
expect(throttled()).toEqual(mockPromise);
|
||||||
expect(mockTimeout).toHaveBeenCalledWith(mockFn, 0, false);
|
expect(mockFn).not.toHaveBeenCalled();
|
||||||
|
expect(mockTimeout)
|
||||||
|
.toHaveBeenCalledWith(jasmine.any(Function), 0, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("schedules only one timeout at a time", function () {
|
it("schedules only one timeout at a time", function () {
|
||||||
@ -59,10 +61,11 @@ define(
|
|||||||
it("schedules additional invocations after resolution", function () {
|
it("schedules additional invocations after resolution", function () {
|
||||||
var throttled = throttle(mockFn);
|
var throttled = throttle(mockFn);
|
||||||
throttled();
|
throttled();
|
||||||
mockPromise.then.mostRecentCall.args[0](); // Resolve timeout
|
mockTimeout.mostRecentCall.args[0](); // Resolve timeout
|
||||||
throttled();
|
throttled();
|
||||||
mockPromise.then.mostRecentCall.args[0]();
|
mockTimeout.mostRecentCall.args[0]();
|
||||||
throttled();
|
throttled();
|
||||||
|
mockTimeout.mostRecentCall.args[0]();
|
||||||
expect(mockTimeout.calls.length).toEqual(3);
|
expect(mockTimeout.calls.length).toEqual(3);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -102,7 +102,8 @@ define(
|
|||||||
'getDomainValue',
|
'getDomainValue',
|
||||||
'getTelemetryObjects',
|
'getTelemetryObjects',
|
||||||
'getRangeValue',
|
'getRangeValue',
|
||||||
'getDatum'
|
'getDatum',
|
||||||
|
'request'
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
mockEvent = jasmine.createSpyObj(
|
mockEvent = jasmine.createSpyObj(
|
||||||
|
@ -212,7 +212,12 @@ define(
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("indicates if a request is pending", function () {
|
it("indicates if a request is pending", function () {
|
||||||
// Placeholder; need to support requesting telemetry
|
mockScope.$watch.mostRecentCall.args[1](mockDomainObject);
|
||||||
|
expect(controller.isRequestPending()).toBeTruthy();
|
||||||
|
mockHandle.request.mostRecentCall.args[1](
|
||||||
|
mockDomainObject,
|
||||||
|
mockSeries
|
||||||
|
);
|
||||||
expect(controller.isRequestPending()).toBeFalsy();
|
expect(controller.isRequestPending()).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user