blob: f8614d28eca21fdbf6ab515b552630b00ea9fa11 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { expect } from "chai";
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()).to.deep.equal({ x: 0, y: 10 });
});
});
});
|