mirror of
https://github.com/mapillary/mapillary-js.git
synced 2026-01-25 14:07:28 +00:00
Remove deprecated TSD dependency. Use Typings to install type definitions. Install rx typings from npm package.
32 lines
795 B
TypeScript
32 lines
795 B
TypeScript
/// <reference path="../../typings/browser.d.ts" />
|
|
|
|
import {LoadingService} from "../../src/Viewer";
|
|
|
|
describe("LoadingService", () => {
|
|
var loadingService: LoadingService;
|
|
|
|
beforeEach(() => {
|
|
loadingService = new LoadingService();
|
|
});
|
|
|
|
it("should emit loading status", (done) => {
|
|
loadingService.loading$.subscribe((loading: boolean) => {
|
|
expect(loading).toBe(true);
|
|
done();
|
|
});
|
|
|
|
loadingService.startLoading("task");
|
|
});
|
|
|
|
it("should emit not loading status", (done) => {
|
|
loadingService.startLoading("test");
|
|
|
|
loadingService.loading$.subscribe((loading: boolean) => {
|
|
expect(loading).toBe(false);
|
|
done();
|
|
});
|
|
|
|
loadingService.stopLoading("task");
|
|
});
|
|
});
|