aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/__tests__/ducks
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2017-03-26 21:58:47 +0800
committerMatthew Shao <me@matshao.com>2017-03-26 21:58:47 +0800
commit9a604b5cfe8bc8af2d3a087372131ab50788e802 (patch)
tree27094ba9367ea7449b603bca0806ccd37f65ee8b /web/src/js/__tests__/ducks
parent17ac1ff6cb854e145d52f0509f218bbb14fcb2c3 (diff)
downloadmitmproxy-9a604b5cfe8bc8af2d3a087372131ab50788e802.tar.gz
mitmproxy-9a604b5cfe8bc8af2d3a087372131ab50788e802.tar.bz2
mitmproxy-9a604b5cfe8bc8af2d3a087372131ab50788e802.zip
[web] Minor fixes for the test.
Diffstat (limited to 'web/src/js/__tests__/ducks')
-rw-r--r--web/src/js/__tests__/ducks/settingsSpec.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/src/js/__tests__/ducks/settingsSpec.js b/web/src/js/__tests__/ducks/settingsSpec.js
index 325cc8e2..cb9df918 100644
--- a/web/src/js/__tests__/ducks/settingsSpec.js
+++ b/web/src/js/__tests__/ducks/settingsSpec.js
@@ -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({})
})
})