Show info on yanked
This commit is contained in:
parent
b0d2b53281
commit
7ac00fce6f
12 changed files with 84 additions and 31 deletions
|
@ -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');
|
||||
|
|
|
@ -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);
|
||||
|
|
Reference in a new issue