aboutsummaryrefslogtreecommitdiff
path: root/test/content/actions
diff options
context:
space:
mode:
Diffstat (limited to 'test/content/actions')
-rw-r--r--test/content/actions/addon.test.js26
-rw-r--r--test/content/actions/input.test.js8
2 files changed, 27 insertions, 7 deletions
diff --git a/test/content/actions/addon.test.js b/test/content/actions/addon.test.js
new file mode 100644
index 0000000..7f244dc
--- /dev/null
+++ b/test/content/actions/addon.test.js
@@ -0,0 +1,26 @@
+import { expect } from "chai";
+import actions from 'content/actions';
+import * as addonActions from 'content/actions/addon';
+
+describe("addon actions", () => {
+ describe("enable", () => {
+ it('create ADDON_ENABLE action', () => {
+ let action = addonActions.enable();
+ expect(action.type).to.equal(actions.ADDON_ENABLE);
+ });
+ });
+
+ describe("disable", () => {
+ it('create ADDON_DISABLE action', () => {
+ let action = addonActions.disable();
+ expect(action.type).to.equal(actions.ADDON_DISABLE);
+ });
+ });
+
+ describe("toggle", () => {
+ it('create ADDON_TOGGLE_ENABLED action', () => {
+ let action = addonActions.toggleEnabled();
+ expect(action.type).to.equal(actions.ADDON_TOGGLE_ENABLED);
+ });
+ });
+});
diff --git a/test/content/actions/input.test.js b/test/content/actions/input.test.js
index 6031829..30705d2 100644
--- a/test/content/actions/input.test.js
+++ b/test/content/actions/input.test.js
@@ -5,16 +5,10 @@ import * as inputActions from 'content/actions/input';
describe("input actions", () => {
describe("keyPress", () => {
it('create INPUT_KEY_PRESS action', () => {
- let action = inputActions.keyPress('a', false);
+ let action = inputActions.keyPress('a');
expect(action.type).to.equal(actions.INPUT_KEY_PRESS);
expect(action.key).to.equal('a');
});
-
- it('create INPUT_KEY_PRESS action from key with ctrl', () => {
- let action = inputActions.keyPress('b', true);
- expect(action.type).to.equal(actions.INPUT_KEY_PRESS);
- expect(action.key).to.equal('<C-B>');
- });
});
describe("clearKeys", () => {