aboutsummaryrefslogtreecommitdiff
path: root/test/background/reducers/find.test.js
blob: c3662230e9f8e983a09fffc532caf2d627c5122e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import actions from 'background/actions';
import findReducer from 'background/reducers/find';

describe("find reducer", () => {
  it('return the initial state', () => {
    let state = findReducer(undefined, {});
    expect(state).to.have.deep.property('keyword', null);
  });

  it('return next state for FIND_SET_KEYWORD', () => {
    let action = {
      type: actions.FIND_SET_KEYWORD,
      keyword: 'cherry',
    };
    let state = findReducer(undefined, action);
    expect(state).to.have.deep.property('keyword', 'cherry')
  });
});