mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
[web] Minor fixes for the test.
This commit is contained in:
parent
17ac1ff6cb
commit
9a604b5cfe
@ -1,8 +1,7 @@
|
|||||||
jest.unmock('../../ducks/settings')
|
jest.unmock('../../ducks/settings')
|
||||||
jest.mock('../../utils')
|
jest.mock('../../utils')
|
||||||
|
|
||||||
import reduceSettings from '../../ducks/settings'
|
import reduceSettings, * as SettingsActions from '../../ducks/settings'
|
||||||
import * as SettingsActions from '../../ducks/settings'
|
|
||||||
|
|
||||||
describe('setting reducer', () => {
|
describe('setting reducer', () => {
|
||||||
it('should return initial state', () => {
|
it('should return initial state', () => {
|
||||||
@ -17,7 +16,11 @@ describe('setting reducer', () => {
|
|||||||
it('should handle update action', () => {
|
it('should handle update action', () => {
|
||||||
let action = {type: SettingsActions.UPDATE, data: {id: 1} }
|
let action = {type: SettingsActions.UPDATE, data: {id: 1} }
|
||||||
expect(reduceSettings(undefined, action)).toEqual({id: 1})
|
expect(reduceSettings(undefined, action)).toEqual({id: 1})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('setting actions', () => {
|
||||||
|
it('should be possible to update setting', () => {
|
||||||
expect(reduceSettings(undefined, SettingsActions.update())).toEqual({})
|
expect(reduceSettings(undefined, SettingsActions.update())).toEqual({})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user