@@ -211,7 +211,7 @@ describe('i18n instance', () => {
211
211
212
212
const $translations = translations . get ( ) ;
213
213
214
- expect ( $translations [ initLocale ] [ 'common.preprocess.0.test' ] ) . toBe ( 'passed' ) ;
214
+ expect ( $translations [ initLocale ] [ 'common.preprocess.0.test.array ' ] ) . toBe ( 'passed' ) ;
215
215
} ) ;
216
216
it ( '`preprocess` works when set to `preserveArrays`' , async ( ) => {
217
217
const { loadTranslations, translations } = new i18n ( { loaders, log, preprocess : 'preserveArrays' } ) ;
@@ -220,7 +220,16 @@ describe('i18n instance', () => {
220
220
221
221
const $translations = translations . get ( ) ;
222
222
223
- expect ( $translations [ initLocale ] [ 'common.preprocess' ] [ 0 ] . test ) . toBe ( 'passed' ) ;
223
+ expect ( $translations [ initLocale ] [ 'common.preprocess' ] ) . toStrictEqual ( [
224
+ { 'test.array' : 'passed' } ,
225
+ 'string' ,
226
+ null ,
227
+ 0 ,
228
+ 1 ,
229
+ - 1 ,
230
+ true ,
231
+ false ,
232
+ ] ) ;
224
233
} ) ;
225
234
it ( '`preprocess` works when set to `none`' , async ( ) => {
226
235
const { loadTranslations, translations, rawTranslations } = new i18n ( { loaders, log, preprocess : 'none' } ) ;
@@ -231,7 +240,7 @@ describe('i18n instance', () => {
231
240
const $rawTranslations = rawTranslations . get ( ) ;
232
241
233
242
expect ( $translations ) . toStrictEqual ( $rawTranslations ) ;
234
- expect ( $translations [ initLocale ] . common . preprocess [ 0 ] . test ) . toBe ( 'passed' ) ;
243
+ expect ( $translations [ initLocale ] . common . preprocess [ 0 ] . test . array ) . toBe ( 'passed' ) ;
235
244
} ) ;
236
245
it ( 'initializes properly with `initLocale`' , async ( ) => {
237
246
const { initialized, loadConfig } = new i18n ( ) ;
0 commit comments