A fork of https://github.com/ueokande/vim-vixen
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
848 B
27 lines
848 B
7 years ago
|
import { expect } from "chai";
|
||
7 years ago
|
import actions from 'content/actions';
|
||
|
import * as inputActions from 'content/actions/input';
|
||
7 years ago
|
|
||
|
describe("input actions", () => {
|
||
|
describe("keyPress", () => {
|
||
7 years ago
|
it('create INPUT_KEY_PRESS action', () => {
|
||
7 years ago
|
let action = inputActions.keyPress('a', false);
|
||
7 years ago
|
expect(action.type).to.equal(actions.INPUT_KEY_PRESS);
|
||
7 years ago
|
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>');
|
||
7 years ago
|
});
|
||
7 years ago
|
});
|
||
|
|
||
|
describe("clearKeys", () => {
|
||
7 years ago
|
it('create INPUT_CLEAR_KEYSaction', () => {
|
||
|
let action = inputActions.clearKeys();
|
||
|
expect(action.type).to.equal(actions.INPUT_CLEAR_KEYS);
|
||
|
});
|
||
7 years ago
|
});
|
||
|
});
|