mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-25 09:37:37 +00:00
fix optionsSpec.js
This commit is contained in:
parent
b9254379a2
commit
5b229c2dcd
@ -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})
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user