summaryrefslogtreecommitdiffhomepage
path: root/test/logout.spec.js
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-06-01 16:13:10 +0200
committerAndrej Mihajlov <and@mullvad.net>2018-06-05 12:11:55 +0200
commitca2f6fbfcad7b73d4ea63ef46cb1cab943ec9087 (patch)
treeb1f7754eb50896ab3681e35fa4e08be642b940c9 /test/logout.spec.js
parent5852c980980de53e00d76a0bdb4b41bf5c0f5b39 (diff)
downloadmullvadvpn-ca2f6fbfcad7b73d4ea63ef46cb1cab943ec9087.tar.xz
mullvadvpn-ca2f6fbfcad7b73d4ea63ef46cb1cab943ec9087.zip
Add formatted source code
Diffstat (limited to 'test/logout.spec.js')
-rw-r--r--test/logout.spec.js27
1 files changed, 16 insertions, 11 deletions
diff --git a/test/logout.spec.js b/test/logout.spec.js
index 0e295aef9b..c7ed45adb2 100644
--- a/test/logout.spec.js
+++ b/test/logout.spec.js
@@ -1,35 +1,41 @@
// @flow
import { expect } from 'chai';
-import { setupBackendAndStore, setupBackendAndMockStore, getLocation, checkNextTick, failFastNextTick } from './helpers/ipc-helpers';
+import {
+ setupBackendAndStore,
+ setupBackendAndMockStore,
+ getLocation,
+ checkNextTick,
+ failFastNextTick,
+} from './helpers/ipc-helpers';
import { IpcChain } from './helpers/IpcChain';
import accountActions from '../app/redux/account/actions';
describe('logging out', () => {
-
it('should set the account to null and then disconnect', (done) => {
const { mockIpc, backend } = setupBackendAndStore();
const chain = new IpcChain(mockIpc);
- chain.require('setAccount')
+ chain
+ .require('setAccount')
.withInputValidation((num) => {
expect(num).to.be.null;
})
.done();
- chain.require('disconnect')
- .done();
+ chain.require('disconnect').done();
chain.onSuccessOrFailure(done);
backend.logout();
});
-
it('should remove the account number from the store', (done) => {
-
const { store, backend, mockIpc } = setupBackendAndStore();
- mockIpc.getAccountData = () => new Promise(r => r({
- expiry: '2001-01-01T00:00:00.000Z',
- }));
+ mockIpc.getAccountData = () =>
+ new Promise((r) =>
+ r({
+ expiry: '2001-01-01T00:00:00.000Z',
+ }),
+ );
const action: any = accountActions.login(backend, '123');
store.dispatch(action);
@@ -53,7 +59,6 @@ describe('logging out', () => {
}, done);
});
-
it('should redirect to / on logout', (done) => {
const { store, backend } = setupBackendAndMockStore();