aboutsummaryrefslogtreecommitdiff
path: root/test/background/operators/impls/TabOperatorFactoryChain.test.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2021-09-26 17:01:31 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2021-09-26 17:23:14 +0900
commite304581fb15eabb3a973d363a282ee7546561e01 (patch)
tree1afb21a2dee2ada3d10c1417fa61c0aae1f83077 /test/background/operators/impls/TabOperatorFactoryChain.test.ts
parent11d6d725eee2ac0a1c16e4c7a4ce4f296bb6b016 (diff)
Do not use chai on unit test
Diffstat (limited to 'test/background/operators/impls/TabOperatorFactoryChain.test.ts')
-rw-r--r--test/background/operators/impls/TabOperatorFactoryChain.test.ts35
1 files changed, 17 insertions, 18 deletions
diff --git a/test/background/operators/impls/TabOperatorFactoryChain.test.ts b/test/background/operators/impls/TabOperatorFactoryChain.test.ts
index a777973..57e6321 100644
--- a/test/background/operators/impls/TabOperatorFactoryChain.test.ts
+++ b/test/background/operators/impls/TabOperatorFactoryChain.test.ts
@@ -1,5 +1,4 @@
import "reflect-metadata";
-import { expect } from "chai";
import TabOperatorFactoryChain from "../../../../src/background/operators/impls/TabOperatorFactoryChain";
import MockTabPresenter from "../../mock/MockTabPresenter";
import DuplicateTabOperator from "../../../../src/background/operators/impls/DuplicateTabOperator";
@@ -23,49 +22,49 @@ describe("TabOperatorFactoryChain", () => {
const tabPresenter = new MockTabPresenter();
const sut = new TabOperatorFactoryChain(tabPresenter);
- expect(sut.create({ type: operations.TAB_CLOSE })).to.be.instanceOf(
+ expect(sut.create({ type: operations.TAB_CLOSE })).toBeInstanceOf(
CloseTabOperator
);
- expect(sut.create({ type: operations.TAB_CLOSE_RIGHT })).to.be.instanceOf(
+ expect(sut.create({ type: operations.TAB_CLOSE_RIGHT })).toBeInstanceOf(
CloseTabRightOperator
);
- expect(sut.create({ type: operations.TAB_CLOSE_FORCE })).to.be.instanceOf(
+ expect(sut.create({ type: operations.TAB_CLOSE_FORCE })).toBeInstanceOf(
CloseTabOperator
);
- expect(sut.create({ type: operations.TAB_REOPEN })).to.be.instanceOf(
+ expect(sut.create({ type: operations.TAB_REOPEN })).toBeInstanceOf(
ReopenTabOperator
);
- expect(sut.create({ type: operations.TAB_PREV })).to.be.instanceOf(
+ expect(sut.create({ type: operations.TAB_PREV })).toBeInstanceOf(
SelectTabPrevOperator
);
- expect(sut.create({ type: operations.TAB_NEXT })).to.be.instanceOf(
+ expect(sut.create({ type: operations.TAB_NEXT })).toBeInstanceOf(
SelectTabNextOperator
);
- expect(sut.create({ type: operations.TAB_FIRST })).to.be.instanceOf(
+ expect(sut.create({ type: operations.TAB_FIRST })).toBeInstanceOf(
SelectFirstTabOperator
);
- expect(sut.create({ type: operations.TAB_LAST })).to.be.instanceOf(
+ expect(sut.create({ type: operations.TAB_LAST })).toBeInstanceOf(
SelectLastTabOperator
);
- expect(sut.create({ type: operations.TAB_PREV_SEL })).to.be.instanceOf(
+ expect(sut.create({ type: operations.TAB_PREV_SEL })).toBeInstanceOf(
SelectPreviousSelectedTabOperator
);
expect(
sut.create({ type: operations.TAB_RELOAD, cache: false })
- ).to.be.instanceOf(ReloadTabOperator);
- expect(sut.create({ type: operations.TAB_PIN })).to.be.instanceOf(
+ ).toBeInstanceOf(ReloadTabOperator);
+ expect(sut.create({ type: operations.TAB_PIN })).toBeInstanceOf(
PinTabOperator
);
- expect(sut.create({ type: operations.TAB_UNPIN })).to.be.instanceOf(
+ expect(sut.create({ type: operations.TAB_UNPIN })).toBeInstanceOf(
UnpinTabOperator
);
- expect(
- sut.create({ type: operations.TAB_TOGGLE_PINNED })
- ).to.be.instanceOf(TogglePinnedTabOperator);
- expect(sut.create({ type: operations.TAB_DUPLICATE })).to.be.instanceOf(
+ expect(sut.create({ type: operations.TAB_TOGGLE_PINNED })).toBeInstanceOf(
+ TogglePinnedTabOperator
+ );
+ expect(sut.create({ type: operations.TAB_DUPLICATE })).toBeInstanceOf(
DuplicateTabOperator
);
- expect(sut.create({ type: operations.CANCEL })).to.be.null;
+ expect(sut.create({ type: operations.CANCEL })).toBeNull;
});
});
});