This commit is contained in:
crptm 2017-07-04 06:42:52 +04:00
parent bead2b30ad
commit 8696213e91
2 changed files with 6 additions and 5 deletions

View File

@ -10,6 +10,7 @@
"^routing": "<rootDir>/common/routing",
"^components$": "<rootDir>/common/components",
"^containers$": "<rootDir>/common/containers",
"^translations(.*)": "<rootDir>/common/translations$1"
"^translations(.*)": "<rootDir>/common/translations$1",
"^libs(.*)": "<rootDir>/common/libs$1"
}
}

View File

@ -1,12 +1,12 @@
import { CHANGE_LANGUAGE, CONFIG_LANGUAGE_CHANGE } from '../../common/actions/config';
import { changeLanguage } from '../../common/actions/config';
describe('actions', () => {
it('should create an action to change language to index', () => {
const value = { name: 'English', sign: 'en' };
const value = 'en' ;
const expectedAction = {
type: CONFIG_LANGUAGE_CHANGE,
type: 'CONFIG_LANGUAGE_CHANGE',
value
};
expect(CHANGE_LANGUAGE(value)).toEqual(expectedAction);
expect(changeLanguage(value)).toEqual(expectedAction);
});
});