diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/console/actions/console.test.js (renamed from test/actions/console.test.js) | 4 | ||||
-rw-r--r-- | test/console/reducers/console.test.js (renamed from test/reducers/console.test.js) | 30 |
2 files changed, 17 insertions, 17 deletions
diff --git a/test/actions/console.test.js b/test/console/actions/console.test.js index ff905bc..dd04c85 100644 --- a/test/actions/console.test.js +++ b/test/console/actions/console.test.js @@ -1,6 +1,6 @@ import { expect } from "chai"; -import actions from 'actions'; -import * as consoleActions from 'actions/console'; +import actions from 'console/actions'; +import * as consoleActions from 'console/actions/console'; describe("console actions", () => { describe("showCommand", () => { diff --git a/test/reducers/console.test.js b/test/console/reducers/console.test.js index 5ebf4bc..95ac993 100644 --- a/test/reducers/console.test.js +++ b/test/console/reducers/console.test.js @@ -1,10 +1,10 @@ import { expect } from "chai"; -import actions from 'actions'; -import consoleReducer from 'reducers/console'; +import actions from 'console/actions'; +import reducer from 'console/reducers'; describe("console reducer", () => { it('return the initial state', () => { - let state = consoleReducer(undefined, {}); + let state = reducer(undefined, {}); expect(state).to.have.property('errorShown', false); expect(state).to.have.property('errorText', ''); expect(state).to.have.property('commandShown', false); @@ -16,7 +16,7 @@ describe("console reducer", () => { it('return next state for CONSOLE_SHOW_COMMAND', () => { let action = { type: actions.CONSOLE_SHOW_COMMAND, text: 'open ' }; - let state = consoleReducer({}, action); + let state = reducer({}, action); expect(state).to.have.property('commandShown', true); expect(state).to.have.property('commandText', 'open '); expect(state).to.have.property('errorShown', false); @@ -24,7 +24,7 @@ describe("console reducer", () => { it('return next state for CONSOLE_SHOW_ERROR', () => { let action = { type: actions.CONSOLE_SHOW_ERROR, text: 'an error' }; - let state = consoleReducer({}, action); + let state = reducer({}, action); expect(state).to.have.property('errorShown', true); expect(state).to.have.property('errorText', 'an error'); expect(state).to.have.property('commandShown', false); @@ -32,7 +32,7 @@ describe("console reducer", () => { it('return next state for CONSOLE_HIDE', () => { let action = { type: actions.CONSOLE_HIDE }; - let state = consoleReducer({}, action); + let state = reducer({}, action); expect(state).to.have.property('errorShown', false); expect(state).to.have.property('commandShown', false); }); @@ -53,7 +53,7 @@ describe("console reducer", () => { items: [4, 5, 6] }] } - state = consoleReducer(state, action); + state = reducer(state, action); expect(state).to.have.property('completions', action.completions); expect(state).to.have.property('groupSelection', -1); expect(state).to.have.property('itemSelection', -1); @@ -73,16 +73,16 @@ describe("console reducer", () => { }] }; - state = consoleReducer(state, action); + state = reducer(state, action); expect(state).to.have.property('groupSelection', 0); expect(state).to.have.property('itemSelection', 0); - state = consoleReducer(state, action); + state = reducer(state, action); expect(state).to.have.property('groupSelection', 0); expect(state).to.have.property('itemSelection', 1); - state = consoleReducer(state, action); - state = consoleReducer(state, action); + state = reducer(state, action); + state = reducer(state, action); expect(state).to.have.property('groupSelection', -1); expect(state).to.have.property('itemSelection', -1); }); @@ -101,16 +101,16 @@ describe("console reducer", () => { }] }; - state = consoleReducer(state, action); + state = reducer(state, action); expect(state).to.have.property('groupSelection', 1); expect(state).to.have.property('itemSelection', 0); - state = consoleReducer(state, action); + state = reducer(state, action); expect(state).to.have.property('groupSelection', 0); expect(state).to.have.property('itemSelection', 1); - state = consoleReducer(state, action); - state = consoleReducer(state, action); + state = reducer(state, action); + state = reducer(state, action); expect(state).to.have.property('groupSelection', -1); expect(state).to.have.property('itemSelection', -1); }); |