11import reducer from '../src/reducer'
22import initialState from '../src/initialState'
3+ import {
4+ SET_CURRENT_LANGUAGE ,
5+ SET_LANGUAGES ,
6+ SET_DICTIONARIES ,
7+ ADD_DICTIONARY
8+ } from '../src/action-types'
39
410describe ( 'i18n reducer' , ( ) => {
511 it ( 'should return the initial state' , ( ) => {
@@ -8,12 +14,12 @@ describe('i18n reducer', () => {
814 ) . toEqual ( initialState )
915 } )
1016
11- it ( 'should handle SET_CURRENT ' , ( ) => {
17+ it ( 'should handle SET_CURRENT_LANGUAGE ' , ( ) => {
1218 let newState = Object . assign ( { } , initialState )
1319 newState . currentLanguage = 'en-US'
1420 expect (
1521 reducer ( initialState , {
16- type : 'SET_CURRENT' ,
22+ type : SET_CURRENT_LANGUAGE ,
1723 data : 'en-US'
1824 } )
1925 ) . toEqual (
@@ -36,7 +42,7 @@ describe('i18n reducer', () => {
3642 ]
3743 expect (
3844 reducer ( initialState , {
39- type : ' SET_LANGUAGES' ,
45+ type : SET_LANGUAGES ,
4046 data : [
4147 {
4248 code : 'car-CAR' ,
@@ -68,7 +74,7 @@ describe('i18n reducer', () => {
6874 }
6975 expect (
7076 reducer ( initialState , {
71- type : ' SET_DICTIONARIES' ,
77+ type : SET_DICTIONARIES ,
7278 data : {
7379 'car-CAR' : {
7480 'key_1' : 'Первый дефолтный ключ птичьего языка для теста' ,
@@ -95,7 +101,7 @@ describe('i18n reducer', () => {
95101
96102 expect (
97103 reducer ( initialState , {
98- type : ' ADD_DICTIONARY' ,
104+ type : ADD_DICTIONARY ,
99105 data : {
100106 languageCode : 'new-NEW' ,
101107 dictionary : {
0 commit comments