aboutsummaryrefslogtreecommitdiff
path: root/test/console/actions/completion.test.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2021-04-04 21:34:13 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2021-04-05 22:21:33 +0900
commit3a7e55fd292196f600c11fad36425014677a1351 (patch)
tree53827f62aaea916cf8c76f6d3e08866f1db0d716 /test/console/actions/completion.test.ts
parent39f96db5a3187b4ce2e7df529eaa456ee862dd68 (diff)
Separate Command and Completion reducer
Diffstat (limited to 'test/console/actions/completion.test.ts')
-rw-r--r--test/console/actions/completion.test.ts28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/console/actions/completion.test.ts b/test/console/actions/completion.test.ts
new file mode 100644
index 0000000..cd6899a
--- /dev/null
+++ b/test/console/actions/completion.test.ts
@@ -0,0 +1,28 @@
+import * as completionActions from "../../../src/console/actions/completion";
+import {
+ COMPLETION_COMPLETION_NEXT,
+ COMPLETION_COMPLETION_PREV,
+} from "../../../src/console/actions/completion";
+import { expect } from "chai";
+
+import browserFake from "webextensions-api-fake";
+
+describe("completion actions", () => {
+ beforeEach(() => {
+ (global as any).browser = browserFake();
+ });
+
+ describe("completionPrev", () => {
+ it("create COMPLETION_COMPLETION_PREV action", () => {
+ const action = completionActions.completionPrev();
+ expect(action.type).to.equal(COMPLETION_COMPLETION_PREV);
+ });
+ });
+
+ describe("completionNext", () => {
+ it("create COMPLETION_COMPLETION_NEXT action", () => {
+ const action = completionActions.completionNext();
+ expect(action.type).to.equal(COMPLETION_COMPLETION_NEXT);
+ });
+ });
+});