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.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/content/operators/impls/FocusOperator.test.ts b/test/content/operators/impls/FocusOperator.test.ts
new file mode 100644
index 0000000..a0eb53b
--- /dev/null
+++ b/test/content/operators/impls/FocusOperator.test.ts
@@ -0,0 +1,17 @@
+import sinon from "sinon";
+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 mock = sinon.mock(presenter).expects("focusFirstElement");
+ const sut = new FocusOperator(presenter);
+
+ await sut.run();
+
+ mock.verify();
+ });
+ });
+});