aboutsummaryrefslogtreecommitdiff
path: root/test/content/operators/impls/FocusOperator.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/content/operators/impls/FocusOperator.test.ts')
-rw-r--r--test/content/operators/impls/FocusOperator.test.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/content/operators/impls/FocusOperator.test.ts b/test/content/operators/impls/FocusOperator.test.ts
index a0eb53b..2d72620 100644
--- a/test/content/operators/impls/FocusOperator.test.ts
+++ b/test/content/operators/impls/FocusOperator.test.ts
@@ -1,4 +1,3 @@
-import sinon from "sinon";
import FocusOperator from "../../../../src/content/operators/impls/FocusOperator";
import MockFocusPresenter from "../../mock/MockFocusPresenter";
@@ -6,12 +5,14 @@ describe("FocusOperator", () => {
describe("#run", () => {
it("focus a first input", async () => {
const presenter = new MockFocusPresenter();
- const mock = sinon.mock(presenter).expects("focusFirstElement");
+ const focusFirstElementSpy = jest
+ .spyOn(presenter, "focusFirstElement")
+ .mockReturnValue(true);
const sut = new FocusOperator(presenter);
await sut.run();
- mock.verify();
+ expect(focusFirstElementSpy).toBeCalled();
});
});
});