aboutsummaryrefslogtreecommitdiff
path: root/test/background/operators/impls/ZoomInOperator.test.ts
blob: 1d42421fab63b4db313aed4708b64e93937fe14a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import ZoomInOperator from "../../../../src/background/operators/impls/ZoomInOperator";
import MockZoomPresenter from "../../mock/MockZoomPresenter";

describe("ZoomInOperator", () => {
  describe("#run", () => {
    it("zoom-out the current tab", async () => {
      const zoomPresenter = new MockZoomPresenter();
      const zoomInSpy = jest
        .spyOn(zoomPresenter, "zoomIn")
        .mockReturnValue(Promise.resolve());

      const sut = new ZoomInOperator(zoomPresenter);
      await sut.run();

      expect(zoomInSpy).toBeCalled();
    });
  });
});