From 7ac00fce6f6c431f96c531179c6af3796df7e07a Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 8 Oct 2017 19:08:51 +0900 Subject: Show info on yanked --- test/console/actions/console.test.js | 8 ++++++++ test/console/reducers/console.test.js | 7 +++++++ 2 files changed, 15 insertions(+) (limited to 'test/console') diff --git a/test/console/actions/console.test.js b/test/console/actions/console.test.js index a2c906f..3b02d4a 100644 --- a/test/console/actions/console.test.js +++ b/test/console/actions/console.test.js @@ -11,6 +11,14 @@ describe("console actions", () => { }); }); + describe("showInfo", () => { + it('create CONSOLE_SHOW_INFO action', () => { + let action = consoleActions.showInfo('an info'); + expect(action.type).to.equal(actions.CONSOLE_SHOW_INFO); + expect(action.text).to.equal('an info'); + }); + }); + describe("showError", () => { it('create CONSOLE_SHOW_ERROR action', () => { let action = consoleActions.showError('an error'); diff --git a/test/console/reducers/console.test.js b/test/console/reducers/console.test.js index 497baf2..4f85e55 100644 --- a/test/console/reducers/console.test.js +++ b/test/console/reducers/console.test.js @@ -20,6 +20,13 @@ describe("console reducer", () => { expect(state).to.have.property('commandText', 'open '); }); + it('return next state for CONSOLE_SHOW_INFO', () => { + let action = { type: actions.CONSOLE_SHOW_INFO, text: 'an info' }; + let state = reducer({}, action); + expect(state).to.have.property('mode', 'info'); + expect(state).to.have.property('messageText', 'an info'); + }); + it('return next state for CONSOLE_SHOW_ERROR', () => { let action = { type: actions.CONSOLE_SHOW_ERROR, text: 'an error' }; let state = reducer({}, action); -- cgit v1.2.3