blob: da88f53fa180d7524e2666d589bbc8075a231b0f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import { expect } from "chai";
import actions from '../../src/actions';
import * as completionActions from '../../src/actions/completion';
describe("completion actions", () => {
describe('setItems', () => {
it('create COMPLETION_SET_ITEMS action', () => {
let action = completionActions.setItems([1, 2, 3]);
expect(action.type).to.equal(actions.COMPLETION_SET_ITEMS);
expect(action.groups).to.deep.equal([1, 2, 3]);
});
});
describe('selectNext', () => {
it('create COMPLETION_SELECT_NEXT action', () => {
let action = completionActions.selectNext();
expect(action.type).to.equal(actions.COMPLETION_SELECT_NEXT);
});
});
describe('selectPrev', () => {
it('create COMPLETION_SELECT_PREV action', () => {
let action = completionActions.selectPrev();
expect(action.type).to.equal(actions.COMPLETION_SELECT_PREV);
});
});
});
|