A fork of https://github.com/ueokande/vim-vixen
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
719 B
21 lines
719 B
import actions from 'settings/actions'; |
|
import settingReducer from 'settings/reducers/setting'; |
|
|
|
describe("setting reducer", () => { |
|
it('return the initial state', () => { |
|
let state = settingReducer(undefined, {}); |
|
expect(state).to.have.deep.property('json', ''); |
|
expect(state).to.have.deep.property('value', {}); |
|
}); |
|
|
|
it('return next state for SETTING_SET_SETTINGS', () => { |
|
let action = { |
|
type: actions.SETTING_SET_SETTINGS, |
|
json: '{ "key": "value" }', |
|
value: { key: 123 }, |
|
}; |
|
let state = settingReducer(undefined, action); |
|
expect(state).to.have.deep.property('json', '{ "key": "value" }'); |
|
expect(state).to.have.deep.property('value', { key: 123 }); |
|
}); |
|
});
|
|
|