aboutsummaryrefslogtreecommitdiff
path: root/test/actions/input.test.js
blob: a49a5bc61045a1dc3d3a646cb7a01df54a7468b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { expect } from "chai";
import actions from '../../src/actions';
import * as inputActions from '../../src/actions/input';

describe("input actions", () => {
  describe("keyPress", () => {
    let action = inputActions.keyPress(123, true);
    expect(action.type).to.equal(actions.INPUT_KEY_PRESS);
    expect(action.code).to.equal(123);
    expect(action.ctrl).to.be.true;
  });

  describe("clearKeys", () => {
    let action = inputActions.clearKeys();
    expect(action.type).to.equal(actions.INPUT_CLEAR_KEYS);
  });
});