blob: e09c16a6418e432102e6290c183a889f2c05fee7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import ScrollToHomeOperator from "../../../../src/content/operators/impls/ScrollToHomeOperator";
import MockScrollPresenter from "../../mock/MockScrollPresenter";
import MockSettingRepository from "../../mock/MockSettingRepository";
describe("ScrollToHomeOperator", () => {
describe("#run", () => {
it("scroll to leftmost", async () => {
const presenter = new MockScrollPresenter(10, 10);
const settingRepository = new MockSettingRepository();
const sut = new ScrollToHomeOperator(presenter, settingRepository);
await sut.run();
expect(presenter.getScroll()).toEqual({ x: 0, y: 10 });
});
});
});
|