aboutsummaryrefslogtreecommitdiff
path: root/test/content/operators/impls/ScrollToBottomOperator.test.ts
blob: 500c8f2b512b7a789abc502d3bc9e7153665a10a (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 ScrollToBottomOperator from "../../../../src/content/operators/impls/ScrollToBottomOperator";
import MockScrollPresenter from "../../mock/MockScrollPresenter";
import MockSettingRepository from "../../mock/MockSettingRepository";

describe("ScrollToBottomOperator", () => {
  describe("#run", () => {
    it("scroll to bottom", async () => {
      const presenter = new MockScrollPresenter();
      const settingRepository = new MockSettingRepository();
      const sut = new ScrollToBottomOperator(presenter, settingRepository);

      await sut.run();

      expect(presenter.getScroll()).to.deep.equal({ x: 0, y: Infinity });
    });
  });
});