blob: 526a93ca1216d4295e42ca0819ba275409d07874 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import * as operations from "../../../../src/shared/operations";
import { expect } from "chai";
import FocusOperatorFactoryChain from "../../../../src/content/operators/impls/FocusOperatorFactoryChain";
import FocusOperator from "../../../../src/content/operators/impls/FocusOperator";
import MockFocusPresenter from "../../mock/MockFocusPresenter";
describe("FocusOperatorFactoryChain", () => {
describe("#create", () => {
it("returns an operator", () => {
const sut = new FocusOperatorFactoryChain(new MockFocusPresenter());
expect(
sut.create(
{ type: operations.FOCUS_INPUT, newTab: false, background: false },
0
)
).to.be.instanceOf(FocusOperator);
expect(sut.create({ type: operations.SCROLL_TOP }, 0)).to.be.null;
});
});
});
|