mirror of
https://github.com/mapillary/mapillary-js.git
synced 2026-01-25 14:07:28 +00:00
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import { empty as observableEmpty } from "rxjs";
|
|
|
|
import { ContainerMockCreator } from "../../helper/ContainerMockCreator";
|
|
import { NavigatorMockCreator } from "../../helper/NavigatorMockCreator";
|
|
|
|
import { SliderComponent } from "../../../src/component/slider/SliderComponent";
|
|
import { Container } from "../../../src/viewer/Container";
|
|
|
|
describe("SliderComponent.ctor", () => {
|
|
it("should be defined", () => {
|
|
const sliderComponent: SliderComponent =
|
|
new SliderComponent(
|
|
SliderComponent.componentName,
|
|
new ContainerMockCreator().create(),
|
|
new NavigatorMockCreator().create());
|
|
|
|
expect(sliderComponent).toBeDefined();
|
|
});
|
|
});
|
|
|
|
describe("SliderComponent.deactivate", () => {
|
|
it("should deactivate properly", () => {
|
|
const containerMock: Container = new ContainerMockCreator().create();
|
|
(<jasmine.Spy>containerMock.mouseService.filtered$).and.returnValue(observableEmpty());
|
|
|
|
const sliderComponent: SliderComponent =
|
|
new SliderComponent(
|
|
SliderComponent.componentName,
|
|
new ContainerMockCreator().create(),
|
|
new NavigatorMockCreator().create());
|
|
|
|
sliderComponent.activate();
|
|
sliderComponent.deactivate();
|
|
});
|
|
});
|