aboutsummaryrefslogtreecommitdiff
path: root/test/background/actions
diff options
context:
space:
mode:
Diffstat (limited to 'test/background/actions')
-rw-r--r--test/background/actions/find.test.js12
-rw-r--r--test/background/actions/tab.test.js13
2 files changed, 25 insertions, 0 deletions
diff --git a/test/background/actions/find.test.js b/test/background/actions/find.test.js
new file mode 100644
index 0000000..6b0b846
--- /dev/null
+++ b/test/background/actions/find.test.js
@@ -0,0 +1,12 @@
+import actions from 'background/actions';
+import * as findActions from 'background/actions/find';
+
+describe("find actions", () => {
+ describe("setKeyword", () => {
+ it('create FIND_SET_KEYWORD action', () => {
+ let action = findActions.setKeyword('banana');
+ expect(action.type).to.equal(actions.FIND_SET_KEYWORD);
+ expect(action.keyword).to.equal('banana');
+ });
+ });
+});
diff --git a/test/background/actions/tab.test.js b/test/background/actions/tab.test.js
new file mode 100644
index 0000000..ab57374
--- /dev/null
+++ b/test/background/actions/tab.test.js
@@ -0,0 +1,13 @@
+import actions from 'background/actions';
+import * as tabActions from 'background/actions/tab';
+
+describe("tab actions", () => {
+ describe("selected", () => {
+ it('create TAB_SELECTED action', () => {
+ let action = tabActions.selected(123);
+ expect(action.type).to.equal(actions.TAB_SELECTED);
+ expect(action.tabId).to.equal(123);
+ });
+ });
+});
+