blob: 2d72620863580821411af769a82af2caa131cebf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import FocusOperator from "../../../../src/content/operators/impls/FocusOperator";
import MockFocusPresenter from "../../mock/MockFocusPresenter";
describe("FocusOperator", () => {
describe("#run", () => {
it("focus a first input", async () => {
const presenter = new MockFocusPresenter();
const focusFirstElementSpy = jest
.spyOn(presenter, "focusFirstElement")
.mockReturnValue(true);
const sut = new FocusOperator(presenter);
await sut.run();
expect(focusFirstElementSpy).toBeCalled();
});
});
});
|