diff options
Diffstat (limited to 'test/console')
-rw-r--r-- | test/console/actions/console.test.js | 6 | ||||
-rw-r--r-- | test/console/reducers/console.test.js | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/console/actions/console.test.js b/test/console/actions/console.test.js index 9af13d4..1774431 100644 --- a/test/console/actions/console.test.js +++ b/test/console/actions/console.test.js @@ -3,6 +3,12 @@ import actions from 'console/actions'; import * as consoleActions from 'console/actions/console'; describe("console actions", () => { + describe('hide', () => { + it('create CONSOLE_HIDE action', () => { + let action = consoleActions.hide(); + expect(action.type).to.equal(actions.CONSOLE_HIDE); + }); + }); describe("showCommand", () => { it('create CONSOLE_SHOW_COMMAND action', () => { let action = consoleActions.showCommand('hello'); diff --git a/test/console/reducers/console.test.js b/test/console/reducers/console.test.js index 438d513..d196011 100644 --- a/test/console/reducers/console.test.js +++ b/test/console/reducers/console.test.js @@ -13,6 +13,12 @@ describe("console reducer", () => { expect(state).to.have.property('itemSelection', -1); }); + it('return next state for CONSOLE_HIDE', () => { + let action = { type: actions.CONSOLE_HIDE }; + let state = reducer({ mode: 'error' }, action); + expect(state).to.have.property('mode', ''); + }) + it('return next state for CONSOLE_SHOW_COMMAND', () => { let action = { type: actions.CONSOLE_SHOW_COMMAND, text: 'open ' }; let state = reducer({}, action); |