diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-11-02 11:41:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-02 11:41:11 +0000 |
commit | 9f1a18352fcac690ea714e84f6b1f6d6201ffd67 (patch) | |
tree | eced7b1cc76935aea8e9de2a0cbf79649b032052 /test/content/actions/follow-controller.test.js | |
parent | c4996ef5d8d5d85f49732bb01b6da13b66ea81d5 (diff) | |
parent | 14241ca842b7dc92f26252a0ac7bb7e549d560c8 (diff) |
Merge pull request #123 from ueokande/64-follow-area-tags
follow area tags
Diffstat (limited to 'test/content/actions/follow-controller.test.js')
-rw-r--r-- | test/content/actions/follow-controller.test.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/content/actions/follow-controller.test.js b/test/content/actions/follow-controller.test.js new file mode 100644 index 0000000..298abf2 --- /dev/null +++ b/test/content/actions/follow-controller.test.js @@ -0,0 +1,35 @@ +import { expect } from "chai"; +import actions from 'content/actions'; +import * as followControllerActions from 'content/actions/follow-controller'; + +describe('follow-controller actions', () => { + describe('enable', () => { + it('creates FOLLOW_CONTROLLER_ENABLE action', () => { + let action = followControllerActions.enable(true); + expect(action.type).to.equal(actions.FOLLOW_CONTROLLER_ENABLE); + expect(action.newTab).to.equal(true); + }); + }); + + describe('disable', () => { + it('creates FOLLOW_CONTROLLER_DISABLE action', () => { + let action = followControllerActions.disable(true); + expect(action.type).to.equal(actions.FOLLOW_CONTROLLER_DISABLE); + }); + }); + + describe('keyPress', () => { + it('creates FOLLOW_CONTROLLER_KEY_PRESS action', () => { + let action = followControllerActions.keyPress(100); + expect(action.type).to.equal(actions.FOLLOW_CONTROLLER_KEY_PRESS); + expect(action.key).to.equal(100); + }); + }); + + describe('backspace', () => { + it('creates FOLLOW_CONTROLLER_BACKSPACE action', () => { + let action = followControllerActions.backspace(100); + expect(action.type).to.equal(actions.FOLLOW_CONTROLLER_BACKSPACE); + }); + }); +}); |