diff options
author | Matthew Shao <me@matshao.com> | 2017-05-07 21:27:04 +0800 |
---|---|---|
committer | Matthew Shao <me@matshao.com> | 2017-05-07 21:32:49 +0800 |
commit | 23f180ba4f4876c1d92b2d198f6c6daf888ae650 (patch) | |
tree | 4c25689caffeb0627f3fdcdb8f6453325beafc21 | |
parent | fdec51d732d23edbea1833a445820603d177f5e6 (diff) | |
download | mitmproxy-23f180ba4f4876c1d92b2d198f6c6daf888ae650.tar.gz mitmproxy-23f180ba4f4876c1d92b2d198f6c6daf888ae650.tar.bz2 mitmproxy-23f180ba4f4876c1d92b2d198f6c6daf888ae650.zip |
[web] Clear up jest.unmock()
Automocking is no longer enable by default, so we don't need to unmock
modules manually.
-rw-r--r-- | web/src/js/__tests__/ducks/eventLogSpec.js | 2 | ||||
-rw-r--r-- | web/src/js/__tests__/ducks/flowsSpec.js | 7 | ||||
-rw-r--r-- | web/src/js/__tests__/ducks/settingsSpec.js | 1 | ||||
-rw-r--r-- | web/src/js/__tests__/ducks/tutils.js | 3 | ||||
-rw-r--r-- | web/src/js/__tests__/ducks/ui/flowSpec.js | 4 | ||||
-rw-r--r-- | web/src/js/__tests__/ducks/ui/headerSpec.js | 3 | ||||
-rw-r--r-- | web/src/js/__tests__/ducks/utils/storeSpec.js | 2 |
7 files changed, 3 insertions, 19 deletions
diff --git a/web/src/js/__tests__/ducks/eventLogSpec.js b/web/src/js/__tests__/ducks/eventLogSpec.js index d4d4f37a..1c993734 100644 --- a/web/src/js/__tests__/ducks/eventLogSpec.js +++ b/web/src/js/__tests__/ducks/eventLogSpec.js @@ -1,5 +1,3 @@ -jest.unmock('../../ducks/eventLog') - import reduceEventLog, * as eventLogActions from '../../ducks/eventLog' import reduceStore from '../../ducks/utils/store' diff --git a/web/src/js/__tests__/ducks/flowsSpec.js b/web/src/js/__tests__/ducks/flowsSpec.js index 2dfe046f..5bd866f2 100644 --- a/web/src/js/__tests__/ducks/flowsSpec.js +++ b/web/src/js/__tests__/ducks/flowsSpec.js @@ -1,11 +1,10 @@ -jest.unmock('../../ducks/flows'); jest.mock('../../utils') import reduceFlows from "../../ducks/flows" import * as flowActions from "../../ducks/flows" import reduceStore from "../../ducks/utils/store" -import {fetchApi} from "../../utils" -import {createStore} from "./tutils" +import { fetchApi } from "../../utils" +import { createStore } from "./tutils" describe('flow reducer', () => { let state = undefined @@ -104,7 +103,7 @@ describe('flow reducer', () => { describe('flows actions', () => { - let store = createStore({reduceFlows}) + let store = createStore({ reduceFlows }) let tflow = { id: 1 } it('should handle resume action', () => { diff --git a/web/src/js/__tests__/ducks/settingsSpec.js b/web/src/js/__tests__/ducks/settingsSpec.js index cb9df918..46d56ec7 100644 --- a/web/src/js/__tests__/ducks/settingsSpec.js +++ b/web/src/js/__tests__/ducks/settingsSpec.js @@ -1,4 +1,3 @@ -jest.unmock('../../ducks/settings') jest.mock('../../utils') import reduceSettings, * as SettingsActions from '../../ducks/settings' diff --git a/web/src/js/__tests__/ducks/tutils.js b/web/src/js/__tests__/ducks/tutils.js index 90a21b78..6ae7f080 100644 --- a/web/src/js/__tests__/ducks/tutils.js +++ b/web/src/js/__tests__/ducks/tutils.js @@ -1,6 +1,3 @@ -jest.unmock('redux') -jest.unmock('redux-thunk') - import { combineReducers, applyMiddleware, createStore as createReduxStore } from 'redux' import thunk from 'redux-thunk' diff --git a/web/src/js/__tests__/ducks/ui/flowSpec.js b/web/src/js/__tests__/ducks/ui/flowSpec.js index e994624d..cd6ffa2f 100644 --- a/web/src/js/__tests__/ducks/ui/flowSpec.js +++ b/web/src/js/__tests__/ducks/ui/flowSpec.js @@ -1,7 +1,3 @@ -jest.unmock('../../../ducks/ui/flow') -jest.unmock('../../../ducks/flows') -jest.unmock('lodash') - import _ from 'lodash' import reducer, { startEdit, diff --git a/web/src/js/__tests__/ducks/ui/headerSpec.js b/web/src/js/__tests__/ducks/ui/headerSpec.js index 8968e636..98822fd8 100644 --- a/web/src/js/__tests__/ducks/ui/headerSpec.js +++ b/web/src/js/__tests__/ducks/ui/headerSpec.js @@ -1,6 +1,3 @@ -jest.unmock('../../../ducks/ui/header') -jest.unmock('../../../ducks/flows') - import reducer, { setActiveMenu } from '../../../ducks/ui/header' import * as flowActions from '../../../ducks/flows' diff --git a/web/src/js/__tests__/ducks/utils/storeSpec.js b/web/src/js/__tests__/ducks/utils/storeSpec.js index e4742490..11a8fe23 100644 --- a/web/src/js/__tests__/ducks/utils/storeSpec.js +++ b/web/src/js/__tests__/ducks/utils/storeSpec.js @@ -1,5 +1,3 @@ -jest.unmock('../../../ducks/utils/store') - import reduceStore, * as storeActions from '../../../ducks/utils/store' describe('store reducer', () => { |