mirror of
https://github.com/mapillary/mapillary-js.git
synced 2026-01-18 13:56:53 +00:00
Remove deprecated TSD dependency. Use Typings to install type definitions. Install rx typings from npm package.
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
/// <reference path="../../typings/browser.d.ts" />
|
|
|
|
import * as when from "when";
|
|
|
|
import {IAPINavIm, APIv2} from "../../src/API";
|
|
import {GraphService, Graph, Node} from "../../src/Graph";
|
|
|
|
describe("GraphService", () => {
|
|
var apiV2: APIv2;
|
|
var graphService: GraphService;
|
|
|
|
beforeEach(() => {
|
|
apiV2 = new APIv2("MkJKbDA0bnZuZlcxeTJHTmFqN3g1dzo5NWEzOTg3OWUxZDI3MjM4");
|
|
graphService = new GraphService(apiV2);
|
|
|
|
// spyOn(graphService.tilesService.apiV2.nav, 'im').and.callFake(() => {
|
|
// let result: IAPINavIm = {
|
|
// hs: ["H"],
|
|
// ims: [{key: "A"}],
|
|
// ss: [],
|
|
// };
|
|
//
|
|
// return when(result);
|
|
// });
|
|
|
|
});
|
|
|
|
it("exists", () => {
|
|
expect(graphService).toBeDefined();
|
|
});
|
|
|
|
it("contains an empty graph from the start", (done) => {
|
|
graphService.graph$.subscribe((graph: Graph) => {
|
|
done();
|
|
})
|
|
});
|
|
|
|
// it("should get a key", (done) => {
|
|
// graphService.getNode("A").subscribe((node: Node): void => {
|
|
// done();
|
|
// });
|
|
// });
|
|
});
|