aboutsummaryrefslogtreecommitdiff
path: root/test/background/reducers
diff options
context:
space:
mode:
Diffstat (limited to 'test/background/reducers')
-rw-r--r--test/background/reducers/find.test.js18
-rw-r--r--test/background/reducers/setting.test.js35
-rw-r--r--test/background/reducers/tab.test.js22
3 files changed, 0 insertions, 75 deletions
diff --git a/test/background/reducers/find.test.js b/test/background/reducers/find.test.js
deleted file mode 100644
index c366223..0000000
--- a/test/background/reducers/find.test.js
+++ /dev/null
@@ -1,18 +0,0 @@
-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')
- });
-});
diff --git a/test/background/reducers/setting.test.js b/test/background/reducers/setting.test.js
deleted file mode 100644
index 24d02ea..0000000
--- a/test/background/reducers/setting.test.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import actions from 'background/actions';
-import settingReducer from 'background/reducers/setting';
-
-describe("setting reducer", () => {
- it('return the initial state', () => {
- let state = settingReducer(undefined, {});
- expect(state).to.have.deep.property('value', {});
- });
-
- it('return next state for SETTING_SET_SETTINGS', () => {
- let action = {
- type: actions.SETTING_SET_SETTINGS,
- value: { key: 123 },
- };
- let state = settingReducer(undefined, action);
- expect(state).to.have.deep.property('value', { key: 123 });
- });
-
- it('return next state for SETTING_SET_PROPERTY', () => {
- let state = {
- value: {
- properties: { smoothscroll: true }
- }
- }
- let action = {
- type: actions.SETTING_SET_PROPERTY,
- name: 'encoding',
- value: 'utf-8',
- };
- state = settingReducer(state, action);
-
- expect(state.value.properties).to.have.property('smoothscroll', true);
- expect(state.value.properties).to.have.property('encoding', 'utf-8');
- });
-});
diff --git a/test/background/reducers/tab.test.js b/test/background/reducers/tab.test.js
deleted file mode 100644
index 09fa8a7..0000000
--- a/test/background/reducers/tab.test.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import actions from 'background/actions';
-import tabReducer from 'background/reducers/tab';
-
-describe("tab reducer", () => {
- it('return the initial state', () => {
- let state = tabReducer(undefined, {});
- expect(state.previousSelected).to.equal(-1);
- expect(state.currentSelected).to.equal(-1);
- });
-
- it('return next state for TAB_SELECTED', () => {
- let state = undefined;
-
- state = tabReducer(state, { type: actions.TAB_SELECTED, tabId: 123 });
- expect(state.previousSelected).to.equal(-1);
- expect(state.currentSelected).to.equal(123);
-
- state = tabReducer(state, { type: actions.TAB_SELECTED, tabId: 456 });
- expect(state.previousSelected).to.equal(123);
- expect(state.currentSelected).to.equal(456);
- });
-});