@@ -7,7 +7,7 @@ const appConfig = {
7
7
de : 'Deutsch' ,
8
8
pt : 'Portugues'
9
9
} ,
10
- fallback : 'pt '
10
+ fallback : 'de '
11
11
}
12
12
} ;
13
13
@@ -29,11 +29,10 @@ describe('LocaleUtil', () => {
29
29
it ( 'getSupportedLanguages returns correct languages' , ( ) => {
30
30
const supported = LocaleUtil . getSupportedLanguages ( appConfig ) ;
31
31
expect ( supported ) . to . be . an ( 'object' ) ;
32
- expect ( Object . keys ( supported ) . length ) . to . eql ( 2 ) ;
32
+ expect ( Object . keys ( supported ) . length ) . to . eql ( 3 ) ;
33
33
expect ( supported . en ) . to . eql ( 'English' ) ;
34
34
expect ( supported . de ) . to . eql ( 'Deutsch' ) ;
35
35
expect ( supported . pt ) . to . eql ( 'Portugues' ) ;
36
-
37
36
} ) ;
38
37
39
38
it ( 'getSupportedLanguages returns correct fallback language when lang is unconfigured' , ( ) => {
@@ -55,12 +54,13 @@ describe('LocaleUtil', () => {
55
54
56
55
it ( 'isLanguageSupported returns correct results' , ( ) => {
57
56
const enSupported = LocaleUtil . isLanguageSupported ( 'en' , appConfig ) ;
58
- const ptSupported = LocaleUtil . isLanguageSupported ( 'pt' , appConfig ) ;
59
57
const deSupported = LocaleUtil . isLanguageSupported ( 'de' , appConfig ) ;
60
58
const frSupported = LocaleUtil . isLanguageSupported ( 'fr' , appConfig ) ;
59
+ const ptSupported = LocaleUtil . isLanguageSupported ( 'pt' , appConfig ) ;
61
60
expect ( enSupported ) . to . be . true ;
62
61
expect ( deSupported ) . to . be . true ;
63
62
expect ( frSupported ) . to . be . false ;
63
+ expect ( ptSupported ) . to . be . true ;
64
64
} ) ;
65
65
66
66
it ( 'isLanguageSupported returns correct results when lang is unconfigured' , ( ) => {
0 commit comments