fix optionsSpec.js

This commit is contained in:
zokutyou2@gmail.com 2021-06-26 10:17:58 +09:00
parent b9254379a2
commit 5b229c2dcd

View File

@ -13,12 +13,12 @@ describe('option reducer', () => {
})
it('should handle receive action', () => {
let action = { type: OptionsActions.RECEIVE, data: {id: 'foo'} }
let action = { type: OptionsActions.RECEIVE, data: {id: {value: 'foo'} } }
expect(reduceOptions(undefined, action)).toEqual({id: 'foo'})
})
it('should handle update action', () => {
let action = {type: OptionsActions.UPDATE, data: {id: 1} }
let action = {type: OptionsActions.UPDATE, data: {id: {value: 1} } }
expect(reduceOptions(undefined, action)).toEqual({...OptionsActions.defaultState, id: 1})
})
})