mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 07:08:10 +00:00
[web] Minor fixes for the test.
This commit is contained in:
parent
17ac1ff6cb
commit
9a604b5cfe
@ -14,11 +14,11 @@
|
||||
"unmockedModulePathPatterns": [
|
||||
"react"
|
||||
],
|
||||
"coverageDirectory":"./coverage",
|
||||
"collectCoverage": true,
|
||||
"coveragePathIgnorePatterns": [
|
||||
"<rootDir>/src/js/filt/filt.js"
|
||||
]
|
||||
"coverageDirectory":"./coverage",
|
||||
"collectCoverage": true,
|
||||
"coveragePathIgnorePatterns": [
|
||||
"<rootDir>/src/js/filt/filt.js"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"bootstrap": "^3.3.7",
|
||||
|
@ -1,8 +1,7 @@
|
||||
jest.unmock('../../ducks/settings')
|
||||
jest.mock('../../utils')
|
||||
|
||||
import reduceSettings from '../../ducks/settings'
|
||||
import * as SettingsActions from '../../ducks/settings'
|
||||
import reduceSettings, * as SettingsActions from '../../ducks/settings'
|
||||
|
||||
describe('setting reducer', () => {
|
||||
it('should return initial state', () => {
|
||||
@ -17,7 +16,11 @@ describe('setting reducer', () => {
|
||||
it('should handle update action', () => {
|
||||
let action = {type: SettingsActions.UPDATE, data: {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({})
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user