From 8696213e91f988bbcee1946aa0d598a9aa695293 Mon Sep 17 00:00:00 2001 From: crptm Date: Tue, 4 Jul 2017 06:42:52 +0400 Subject: [PATCH] fix test --- jest_config/jest.config.json | 3 ++- spec/actions/config.spec.js | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/jest_config/jest.config.json b/jest_config/jest.config.json index 3c8b3e2d..3f324639 100644 --- a/jest_config/jest.config.json +++ b/jest_config/jest.config.json @@ -10,6 +10,7 @@ "^routing": "/common/routing", "^components$": "/common/components", "^containers$": "/common/containers", - "^translations(.*)": "/common/translations$1" + "^translations(.*)": "/common/translations$1", + "^libs(.*)": "/common/libs$1" } } diff --git a/spec/actions/config.spec.js b/spec/actions/config.spec.js index 62f64355..a2477043 100644 --- a/spec/actions/config.spec.js +++ b/spec/actions/config.spec.js @@ -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); }); });