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