blob: 25a84ba894b8e30ff2a23489b47d46d174b71232 (
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 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()).to.deep.equal({ x: 10, y: 0 });
});
});
});
|