aboutsummaryrefslogtreecommitdiff
path: root/test/actions
diff options
context:
space:
mode:
Diffstat (limited to 'test/actions')
-rw-r--r--test/actions/completion.test.js27
-rw-r--r--test/actions/console.test.js34
-rw-r--r--test/actions/follow.test.js4
-rw-r--r--test/actions/input.test.js4
4 files changed, 28 insertions, 41 deletions
diff --git a/test/actions/completion.test.js b/test/actions/completion.test.js
deleted file mode 100644
index da88f53..0000000
--- a/test/actions/completion.test.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import { expect } from "chai";
-import actions from '../../src/actions';
-import * as completionActions from '../../src/actions/completion';
-
-describe("completion actions", () => {
- describe('setItems', () => {
- it('create COMPLETION_SET_ITEMS action', () => {
- let action = completionActions.setItems([1, 2, 3]);
- expect(action.type).to.equal(actions.COMPLETION_SET_ITEMS);
- expect(action.groups).to.deep.equal([1, 2, 3]);
- });
- });
-
- describe('selectNext', () => {
- it('create COMPLETION_SELECT_NEXT action', () => {
- let action = completionActions.selectNext();
- expect(action.type).to.equal(actions.COMPLETION_SELECT_NEXT);
- });
- });
-
- describe('selectPrev', () => {
- it('create COMPLETION_SELECT_PREV action', () => {
- let action = completionActions.selectPrev();
- expect(action.type).to.equal(actions.COMPLETION_SELECT_PREV);
- });
- });
-});
diff --git a/test/actions/console.test.js b/test/actions/console.test.js
index 512ee40..ff905bc 100644
--- a/test/actions/console.test.js
+++ b/test/actions/console.test.js
@@ -1,6 +1,6 @@
import { expect } from "chai";
-import actions from '../../src/actions';
-import * as consoleActions from '../../src/actions/console';
+import actions from 'actions';
+import * as consoleActions from 'actions/console';
describe("console actions", () => {
describe("showCommand", () => {
@@ -11,14 +11,6 @@ describe("console actions", () => {
});
});
- describe("setCompletions", () => {
- it('create CONSOLE_SET_COMPLETIONS action', () => {
- let action = consoleActions.setCompletions([1,2,3]);
- expect(action.type).to.equal(actions.CONSOLE_SET_COMPLETIONS);
- expect(action.completions).to.deep.equal([1, 2, 3]);
- });
- });
-
describe("showError", () => {
it('create CONSOLE_SHOW_ERROR action', () => {
let action = consoleActions.showError('an error');
@@ -33,5 +25,27 @@ describe("console actions", () => {
expect(action.type).to.equal(actions.CONSOLE_HIDE);
});
});
+
+ describe("setCompletions", () => {
+ it('create CONSOLE_SET_COMPLETIONS action', () => {
+ let action = consoleActions.setCompletions([1,2,3]);
+ expect(action.type).to.equal(actions.CONSOLE_SET_COMPLETIONS);
+ expect(action.completions).to.deep.equal([1, 2, 3]);
+ });
+ });
+
+ describe("completionPrev", () => {
+ it('create CONSOLE_COMPLETION_PREV action', () => {
+ let action = consoleActions.completionPrev();
+ expect(action.type).to.equal(actions.CONSOLE_COMPLETION_PREV);
+ });
+ });
+
+ describe("completionNext", () => {
+ it('create CONSOLE_COMPLETION_NEXT action', () => {
+ let action = consoleActions.completionNext();
+ expect(action.type).to.equal(actions.CONSOLE_COMPLETION_NEXT);
+ });
+ });
});
diff --git a/test/actions/follow.test.js b/test/actions/follow.test.js
index 9439de7..32ab9e2 100644
--- a/test/actions/follow.test.js
+++ b/test/actions/follow.test.js
@@ -1,6 +1,6 @@
import { expect } from "chai";
-import actions from '../../src/actions';
-import * as followActions from '../../src/actions/follow';
+import actions from 'actions';
+import * as followActions from 'actions/follow';
describe('follow actions', () => {
describe('enable', () => {
diff --git a/test/actions/input.test.js b/test/actions/input.test.js
index 904d3e7..0a2ab18 100644
--- a/test/actions/input.test.js
+++ b/test/actions/input.test.js
@@ -1,6 +1,6 @@
import { expect } from "chai";
-import actions from '../../src/actions';
-import * as inputActions from '../../src/actions/input';
+import actions from 'actions';
+import * as inputActions from 'actions/input';
describe("input actions", () => {
describe("keyPress", () => {