aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-03-04 21:38:29 +0900
committerGitHub <noreply@github.com>2018-03-04 21:38:29 +0900
commit72bf3cc2bdcc63864e064a64f7459aba004f4538 (patch)
tree4a34e2d408cd4f7d29e634b98dea2c07ca10ece9 /test
parent0211d7781fffdb0f4e9a5e523f0f6ea24c5c8db8 (diff)
parent5cd8c81fda2f07bc6ca5b1ee9264a02fae16c5c0 (diff)
Merge pull request #354 from ueokande/hide-console
Hide console
Diffstat (limited to 'test')
-rw-r--r--test/background/reducers/setting.test.js1
-rw-r--r--test/console/actions/console.test.js6
-rw-r--r--test/console/reducers/console.test.js6
-rw-r--r--test/content/actions/setting.test.js2
4 files changed, 14 insertions, 1 deletions
diff --git a/test/background/reducers/setting.test.js b/test/background/reducers/setting.test.js
index 2ef98cb..8df5abe 100644
--- a/test/background/reducers/setting.test.js
+++ b/test/background/reducers/setting.test.js
@@ -30,7 +30,6 @@ describe("setting reducer", () => {
};
state = settingReducer(state, action);
- console.log(state);
expect(state.value.properties).to.have.property('smoothscroll', true);
expect(state.value.properties).to.have.property('encoding', 'utf-8');
});
diff --git a/test/console/actions/console.test.js b/test/console/actions/console.test.js
index 9af13d4..1774431 100644
--- a/test/console/actions/console.test.js
+++ b/test/console/actions/console.test.js
@@ -3,6 +3,12 @@ import actions from 'console/actions';
import * as consoleActions from 'console/actions/console';
describe("console actions", () => {
+ describe('hide', () => {
+ it('create CONSOLE_HIDE action', () => {
+ let action = consoleActions.hide();
+ expect(action.type).to.equal(actions.CONSOLE_HIDE);
+ });
+ });
describe("showCommand", () => {
it('create CONSOLE_SHOW_COMMAND action', () => {
let action = consoleActions.showCommand('hello');
diff --git a/test/console/reducers/console.test.js b/test/console/reducers/console.test.js
index 438d513..d196011 100644
--- a/test/console/reducers/console.test.js
+++ b/test/console/reducers/console.test.js
@@ -13,6 +13,12 @@ describe("console reducer", () => {
expect(state).to.have.property('itemSelection', -1);
});
+ it('return next state for CONSOLE_HIDE', () => {
+ let action = { type: actions.CONSOLE_HIDE };
+ let state = reducer({ mode: 'error' }, action);
+ expect(state).to.have.property('mode', '');
+ })
+
it('return next state for CONSOLE_SHOW_COMMAND', () => {
let action = { type: actions.CONSOLE_SHOW_COMMAND, text: 'open ' };
let state = reducer({}, action);
diff --git a/test/content/actions/setting.test.js b/test/content/actions/setting.test.js
index 1248edf..3112b2d 100644
--- a/test/content/actions/setting.test.js
+++ b/test/content/actions/setting.test.js
@@ -23,6 +23,8 @@ describe("setting actions", () => {
let map = new Map(keymaps);
expect(map).to.have.deep.all.keys(
[
+ [{ key: 'Esc', shiftKey: false, ctrlKey: false, altKey: false, metaKey: false }],
+ [{ key: '[', shiftKey: false, ctrlKey: true, altKey: false, metaKey: false }],
[{ key: 'd', shiftKey: false, ctrlKey: false, altKey: false, metaKey: false },
{ key: 'd', shiftKey: false, ctrlKey: false, altKey: false, metaKey: false }],
[{ key: 'z', shiftKey: false, ctrlKey: false, altKey: false, metaKey: false },