Fix tests

This commit is contained in:
ErickSkrauch 2020-06-04 21:03:24 +03:00
parent f2b4ee1b4d
commit e962a01a4a
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E
2 changed files with 20 additions and 1 deletions

View File

@ -12,6 +12,23 @@ import { Dispatch, RootState } from 'app/reducers';
import { Account } from './reducer'; import { Account } from './reducer';
jest.mock('app/i18n', () => ({
en: {
code: 'en',
name: 'English',
englishName: 'English',
progress: 100,
isReleased: true,
},
be: {
code: 'be',
name: 'Беларуская',
englishName: 'Belarusian',
progress: 97,
isReleased: true,
},
}));
const token = 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlbHl8MSJ9.pRJ7vakt2eIscjqwG__KhSxKb3qwGsdBBeDbBffJs_I'; const token = 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlbHl8MSJ9.pRJ7vakt2eIscjqwG__KhSxKb3qwGsdBBeDbBffJs_I';
const legacyToken = 'eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOjF9.cRF-sQNrwWQ94xCb3vWioVdjxAZeefEE7GMGwh7708o'; const legacyToken = 'eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOjF9.cRF-sQNrwWQ94xCb3vWioVdjxAZeefEE7GMGwh7708o';

View File

@ -11,7 +11,9 @@ export interface Locale {
isReleased: boolean; isReleased: boolean;
} }
const langs: Record<string, Locale> = { export type LocalesList = Record<string, Locale>;
const langs: LocalesList = {
en: { en: {
code: 'en', code: 'en',
name: 'English', name: 'English',