aboutsummaryrefslogtreecommitdiff
path: root/test/settings/reducers
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-12-22 11:10:36 +0900
committerGitHub <noreply@github.com>2019-12-22 11:10:36 +0900
commitb1a6f374dca078dee2406ebe049715b826e37ca2 (patch)
tree5367c48648e2018f55f12d847baba94559e10040 /test/settings/reducers
parentb2dcdedad729ff7087867da50e20578f9fc8fb29 (diff)
parentda72c2ddd916d79d134662e3985b53a4ac78af7a (diff)
Merge pull request #690 from ueokande/eslint-and-prettier
Eslint and prettier
Diffstat (limited to 'test/settings/reducers')
-rw-r--r--test/settings/reducers/setting.test.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/settings/reducers/setting.test.ts b/test/settings/reducers/setting.test.ts
index 376d66e..60df061 100644
--- a/test/settings/reducers/setting.test.ts
+++ b/test/settings/reducers/setting.test.ts
@@ -3,51 +3,51 @@ import settingReducer from 'settings/reducers/setting';
describe("settings setting reducer", () => {
it('return the initial state', () => {
- let state = settingReducer(undefined, {});
+ const state = settingReducer(undefined, {});
expect(state).to.have.deep.property('source', 'json');
expect(state).to.have.deep.property('error', '');
});
it('return next state for SETTING_SET_SETTINGS', () => {
- let action = {
+ const action = {
type: actions.SETTING_SET_SETTINGS,
source: 'json',
json: '{ "key": "value" }',
form: {},
};
- let state = settingReducer(undefined, action);
+ const state = settingReducer(undefined, action);
expect(state).to.have.deep.property('source', 'json');
expect(state).to.have.deep.property('json', '{ "key": "value" }');
expect(state).to.have.deep.property('form', {});
});
it('return next state for SETTING_SHOW_ERROR', () => {
- let action = {
+ const action = {
type: actions.SETTING_SHOW_ERROR,
error: 'bad value',
json: '{}',
};
- let state = settingReducer(undefined, action);
+ const state = settingReducer(undefined, action);
expect(state).to.have.deep.property('error', 'bad value');
expect(state).to.have.deep.property('json', '{}');
});
it('return next state for SETTING_SWITCH_TO_FORM', () => {
- let action = {
+ const action = {
type: actions.SETTING_SWITCH_TO_FORM,
form: {},
};
- let state = settingReducer(undefined, action);
+ const state = settingReducer(undefined, action);
expect(state).to.have.deep.property('form', {});
expect(state).to.have.deep.property('source', 'form');
});
it('return next state for SETTING_SWITCH_TO_JSON', () => {
- let action = {
+ const action = {
type: actions.SETTING_SWITCH_TO_JSON,
json: '{}',
};
- let state = settingReducer(undefined, action);
+ const state = settingReducer(undefined, action);
expect(state).to.have.deep.property('json', '{}');
expect(state).to.have.deep.property('source', 'json');
});