aboutsummaryrefslogtreecommitdiff
path: root/test/background/operators/impls/ZoomOutOperator.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/background/operators/impls/ZoomOutOperator.test.ts')
-rw-r--r--test/background/operators/impls/ZoomOutOperator.test.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/background/operators/impls/ZoomOutOperator.test.ts b/test/background/operators/impls/ZoomOutOperator.test.ts
index e0bbcd9..3165707 100644
--- a/test/background/operators/impls/ZoomOutOperator.test.ts
+++ b/test/background/operators/impls/ZoomOutOperator.test.ts
@@ -1,4 +1,3 @@
-import sinon from "sinon";
import ZoomOutOperator from "../../../../src/background/operators/impls/ZoomOutOperator";
import MockZoomPresenter from "../../mock/MockZoomPresenter";
@@ -6,12 +5,14 @@ describe("ZoomOutOperator", () => {
describe("#run", () => {
it("zoom-in the current tab", async () => {
const zoomPresenter = new MockZoomPresenter();
- const mock = sinon.mock(zoomPresenter).expects("zoomOut").once();
+ const zoomOutSpy = jest
+ .spyOn(zoomPresenter, "zoomOut")
+ .mockReturnValue(Promise.resolve());
const sut = new ZoomOutOperator(zoomPresenter);
await sut.run();
- mock.verify();
+ expect(zoomOutSpy).toBeCalled();
});
});
});