diff --git a/lib/reducers/keyserver-reducer.test.js b/lib/reducers/keyserver-reducer.test.js --- a/lib/reducers/keyserver-reducer.test.js +++ b/lib/reducers/keyserver-reducer.test.js @@ -2,10 +2,7 @@ import reduceKeyserverStore from './keyserver-reducer.js'; import { deleteKeyserverAccountActionTypes } from '../actions/user-actions.js'; -import { - defaultKeyserverInfo, - type KeyserverStore, -} from '../types/keyserver-types.js'; +import { defaultKeyserverInfo } from '../types/keyserver-types.js'; import { authoritativeKeyserverID } from '../utils/authoritative-keyserver.js'; jest.mock('../utils/config.js'); @@ -47,17 +44,17 @@ }); it('update keyserverInfo with authoritativeKeyserverID', () => { const defaultAshoatKeyserverInfo = defaultKeyserverInfo('url1'); - const oldKeyserverStore: KeyserverStore = ({ + const oldKeyserverStore = { keyserverInfos: { [authoritativeKeyserverID()]: { ...defaultAshoatKeyserverInfo, connection: { ...defaultAshoatKeyserverInfo.connection, - connectionIssue: 'blah', + connectionIssue: 'client_version_unsupported', }, }, }, - }: any); + }; const deleteAccountAction = { type: deleteKeyserverAccountActionTypes.success, @@ -88,17 +85,17 @@ it('return the same keyserverInfo with authoritativeKeyserverID()', () => { const defaultAshoatKeyserverInfo = defaultKeyserverInfo('url1'); - const oldKeyserverStore: KeyserverStore = ({ + const oldKeyserverStore = { keyserverInfos: { [authoritativeKeyserverID()]: { ...defaultAshoatKeyserverInfo, connection: { ...defaultAshoatKeyserverInfo.connection, - connectionIssue: 'blah', + connectionIssue: 'client_version_unsupported', }, }, }, - }: any); + }; const deleteAccountAction = { type: deleteKeyserverAccountActionTypes.success, @@ -124,6 +121,6 @@ reduceKeyserverStore(oldKeyserverStore, deleteAccountAction) .keyserverStore.keyserverInfos[authoritativeKeyserverID()].connection .connectionIssue, - ).toEqual('blah'); + ).toEqual('client_version_unsupported'); }); }); diff --git a/lib/types/socket-types.js b/lib/types/socket-types.js --- a/lib/types/socket-types.js +++ b/lib/types/socket-types.js @@ -493,7 +493,7 @@ | 'forcedDisconnecting' | 'disconnected'; -export type ConnectionIssue = empty; +export type ConnectionIssue = 'client_version_unsupported'; export type ConnectionInfo = { +status: ConnectionStatus,