diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-05-01 13:51:07 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-05-01 13:51:07 +0900 |
commit | 4d7c24f38a6861e1d498b6e7dd5c7be2d1a0ad15 (patch) | |
tree | 0948f730a25eeda127c56a0f01009f14d066e4dc /test/background/reducers/find.test.js | |
parent | 177940981ed9c4f096ad7db20f0b7ee044fd7b17 (diff) | |
parent | fb8a0f36aa4d070df936cc7598ef8dd988ee1b15 (diff) |
Merge remote-tracking branch 'origin/master' into background-adjacent-tabs
Diffstat (limited to 'test/background/reducers/find.test.js')
-rw-r--r-- | test/background/reducers/find.test.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/background/reducers/find.test.js b/test/background/reducers/find.test.js new file mode 100644 index 0000000..707d73a --- /dev/null +++ b/test/background/reducers/find.test.js @@ -0,0 +1,19 @@ +import { expect } from "chai"; +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') + }); +}); |