@@ -6,7 +6,7 @@ import { PoI18nConfig } from './interfaces/po-i18n-config.interface';
6
6
7
7
describe ( 'mergePoI18nConfigs' , ( ) => {
8
8
it ( 'should prioritize the last defined default.language in the array' , ( ) => {
9
- const input : PoI18nConfig [ ] = [
9
+ const input : Array < PoI18nConfig > = [
10
10
{ default : { language : 'pt-BR' , context : 'general' , cache : true } , contexts : { } } ,
11
11
{ default : { context : 'general' , cache : true } , contexts : { } } ,
12
12
{ default : { language : 'en-US' , context : 'general' , cache : true } , contexts : { } }
@@ -18,7 +18,7 @@ describe('mergePoI18nConfigs', () => {
18
18
} ) ;
19
19
20
20
it ( 'should fallback to last default if no default.language is defined' , ( ) => {
21
- const input : PoI18nConfig [ ] = [
21
+ const input : Array < PoI18nConfig > = [
22
22
{ default : { context : 'general' , cache : true } , contexts : { } } ,
23
23
{ default : { cache : true } , contexts : { } } ,
24
24
{ default : { context : 'another-context' , cache : false } , contexts : { } }
@@ -31,7 +31,7 @@ describe('mergePoI18nConfigs', () => {
31
31
} ) ;
32
32
33
33
it ( 'should correctly merge contexts and translations' , ( ) => {
34
- const input : PoI18nConfig [ ] = [
34
+ const input : Array < PoI18nConfig > = [
35
35
{
36
36
default : { language : 'pt-BR' , context : 'general' , cache : true } ,
37
37
contexts : {
@@ -76,7 +76,7 @@ describe('mergePoI18nConfigs', () => {
76
76
} ) ;
77
77
78
78
it ( 'should handle null or undefined contexts gracefully' , ( ) => {
79
- const input : PoI18nConfig [ ] = [
79
+ const input : Array < PoI18nConfig > = [
80
80
{ default : { language : 'pt-BR' , context : 'general' , cache : true } , contexts : null } ,
81
81
{ default : { language : 'en-US' , context : 'general' , cache : true } , contexts : undefined } ,
82
82
{
@@ -103,7 +103,7 @@ describe('mergePoI18nConfigs', () => {
103
103
} ) ;
104
104
105
105
it ( 'should apply default fallback if none of the configs have default' , ( ) => {
106
- const input : PoI18nConfig [ ] = [
106
+ const input : Array < PoI18nConfig > = [
107
107
{ contexts : { home : { 'pt-BR' : { test : 'Teste' } } } } ,
108
108
{ contexts : { about : { 'en-US' : { info : 'Info' } } } }
109
109
] ;
0 commit comments