aboutsummaryrefslogtreecommitdiff
path: root/test/content/operators/impls/ScrollToBottomOperator.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/content/operators/impls/ScrollToBottomOperator.test.ts')
-rw-r--r--test/content/operators/impls/ScrollToBottomOperator.test.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/content/operators/impls/ScrollToBottomOperator.test.ts b/test/content/operators/impls/ScrollToBottomOperator.test.ts
new file mode 100644
index 0000000..500c8f2
--- /dev/null
+++ b/test/content/operators/impls/ScrollToBottomOperator.test.ts
@@ -0,0 +1,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 });
+ });
+ });
+});