This repository has been archived on 2020-04-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Vim-Vixen/test/content/reducers/find.test.js
2017-11-11 18:51:32 +09:00

23 lines
639 B
JavaScript

import { expect } from "chai";
import actions from 'content/actions';
import findReducer from 'content/reducers/find';
describe("find reducer", () => {
it('return the initial state', () => {
let state = findReducer(undefined, {});
expect(state).to.have.property('keyword', '');
expect(state).to.have.property('found', false);
});
it('return next state for FIND_SET_KEYWORD', () => {
let action = {
type: actions.FIND_SET_KEYWORD,
keyword: 'xyz',
found: true,
};
let state = findReducer({}, action);
expect(state.keyword).is.equal('xyz');
expect(state.found).to.be.true;
});
});