mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
[web] Minor fixes for the test.
This commit is contained in:
parent
17ac1ff6cb
commit
9a604b5cfe
@ -14,11 +14,11 @@
|
|||||||
"unmockedModulePathPatterns": [
|
"unmockedModulePathPatterns": [
|
||||||
"react"
|
"react"
|
||||||
],
|
],
|
||||||
"coverageDirectory":"./coverage",
|
"coverageDirectory":"./coverage",
|
||||||
"collectCoverage": true,
|
"collectCoverage": true,
|
||||||
"coveragePathIgnorePatterns": [
|
"coveragePathIgnorePatterns": [
|
||||||
"<rootDir>/src/js/filt/filt.js"
|
"<rootDir>/src/js/filt/filt.js"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "^3.3.7",
|
"bootstrap": "^3.3.7",
|
||||||
|
@ -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