emit mapped keys from input-component
This commit is contained in:
parent
c2a663a64d
commit
214a5103f3
6 changed files with 95 additions and 21 deletions
|
@ -5,16 +5,10 @@ import * as inputActions from 'content/actions/input';
|
|||
describe("input actions", () => {
|
||||
describe("keyPress", () => {
|
||||
it('create INPUT_KEY_PRESS action', () => {
|
||||
let action = inputActions.keyPress('a', false);
|
||||
let action = inputActions.keyPress('a');
|
||||
expect(action.type).to.equal(actions.INPUT_KEY_PRESS);
|
||||
expect(action.key).to.equal('a');
|
||||
});
|
||||
|
||||
it('create INPUT_KEY_PRESS action from key with ctrl', () => {
|
||||
let action = inputActions.keyPress('b', true);
|
||||
expect(action.type).to.equal(actions.INPUT_KEY_PRESS);
|
||||
expect(action.key).to.equal('<C-B>');
|
||||
});
|
||||
});
|
||||
|
||||
describe("clearKeys", () => {
|
||||
|
|
Reference in a new issue