[Telemetry] Add test casese

Add test cases for general support for handling real-time telemetry,
WTD-806.
This commit is contained in:
Victor Woeltjen
2015-04-20 16:51:08 -07:00
parent 4d288950fd
commit ffc122fb5c
4 changed files with 146 additions and 0 deletions

View File

@@ -184,6 +184,14 @@ define(
it("fires callback when telemetry objects are available", function () {
expect(mockCallback.calls.length).toEqual(1);
});
it("exposes a promise for telemetry objects", function () {
var mockCallback2 = jasmine.createSpy('callback');
subscription.promiseTelemetryObjects().then(mockCallback2);
expect(mockCallback2)
.toHaveBeenCalledWith([ mockDomainObject ]);
});
});
}
);