diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-11-16 09:32:24 +0100 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-11-20 10:54:17 +0100 |
| commit | fc28970c6382755d536bf485d81929281e5653bf (patch) | |
| tree | 9c87bf1d3c3be4e377bd9dbb75416abc779094b0 /test/helpers | |
| parent | 258eb7a91ef65d3f1692718c5d8a14b2eab12b78 (diff) | |
| download | mullvadvpn-fc28970c6382755d536bf485d81929281e5653bf.tar.xz mullvadvpn-fc28970c6382755d536bf485d81929281e5653bf.zip | |
Always connect to the server set in the settings
Diffstat (limited to 'test/helpers')
| -rw-r--r-- | test/helpers/ipc-helpers.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/helpers/ipc-helpers.js b/test/helpers/ipc-helpers.js index e2a578973b..2a2dd1e6b8 100644 --- a/test/helpers/ipc-helpers.js +++ b/test/helpers/ipc-helpers.js @@ -4,7 +4,7 @@ import { Backend } from '../../app/lib/backend'; import { newMockIpc } from '../mocks/ipc'; import configureStore from '../../app/redux/store'; import { createMemoryHistory } from 'history'; -import { mockState, mockStore } from '../mocks/redux'; +import { mockStore } from '../mocks/redux'; type DoneCallback = (?mixed) => void; type Check = () => void; @@ -32,7 +32,7 @@ export function setupBackendAndStore() { } export function setupBackendAndMockStore() { - const store = mockStore(mockState()); + const store = mockStore(_initialState()); const mockIpc = newMockIpc(); const credentials = { sharedSecret: '', @@ -42,6 +42,11 @@ export function setupBackendAndMockStore() { return { store, mockIpc, backend }; } +function _initialState() { + const { store } = setupIpcAndStore(); + return store.getState(); +} + // chai and async aren't the best of friends. To allow us // to get the assertion error in the output of failed async // tests we need to do this try-catch thing. |
