@@ -109,15 +109,15 @@ describe('i18n hook', () => {
109109 expect ( result . current . t ( 'title' ) ) . toEqual ( en . title )
110110 } )
111111
112- await act ( ( ) => {
112+ act ( ( ) => {
113113 result . current . switchLocale ( 'fr' )
114114 } )
115115
116116 await waitFor ( ( ) => {
117117 expect ( result . current . t ( 'title' ) ) . toEqual ( fr . title )
118118 } )
119119
120- await act ( ( ) => {
120+ act ( ( ) => {
121121 result . current . switchLocale ( 'es' )
122122 } )
123123
@@ -159,7 +159,7 @@ describe('i18n hook', () => {
159159 expect ( result . current . t ( 'lastName' ) ) . toEqual ( 'Last Name' )
160160 expect ( result . current . t ( 'languages' ) ) . toEqual ( 'Languages' )
161161
162- await act ( ( ) => {
162+ act ( ( ) => {
163163 result . current . switchLocale ( 'fr' )
164164 } )
165165
@@ -204,7 +204,7 @@ describe('i18n hook', () => {
204204
205205 // current local will be 'en' based on navigator
206206 // await load of locales
207- await act ( ( ) => {
207+ act ( ( ) => {
208208 result . current . switchLocale ( 'fr' )
209209 } )
210210
@@ -277,7 +277,7 @@ describe('i18n hook', () => {
277277 expect ( result . current . currentLocale ) . toEqual ( 'en' )
278278 expect ( localStorage . getItem ( LOCALE_ITEM_STORAGE ) ) . toBe ( null )
279279
280- await act ( ( ) => {
280+ act ( ( ) => {
281281 result . current . switchLocale ( 'fr' )
282282 } )
283283
@@ -286,7 +286,7 @@ describe('i18n hook', () => {
286286 expect ( localStorage . getItem ( LOCALE_ITEM_STORAGE ) ) . toBe ( 'fr' )
287287 } )
288288
289- await act ( ( ) => {
289+ act ( ( ) => {
290290 result . current . switchLocale ( 'es' )
291291 } )
292292
@@ -295,7 +295,7 @@ describe('i18n hook', () => {
295295 expect ( localStorage . getItem ( LOCALE_ITEM_STORAGE ) ) . toBe ( 'es' )
296296 } )
297297
298- await act ( ( ) => {
298+ act ( ( ) => {
299299 result . current . switchLocale ( 'test' )
300300 } )
301301 expect ( result . current . currentLocale ) . toEqual ( 'es' )
@@ -369,7 +369,7 @@ describe('i18n hook', () => {
369369 } ) ,
370370 ) . toEqual ( '$2.00' )
371371
372- await act ( ( ) => {
372+ act ( ( ) => {
373373 result . current . switchLocale ( 'fr' )
374374 } )
375375
@@ -419,7 +419,7 @@ describe('i18n hook', () => {
419419 } ) ,
420420 ) . toEqual ( 'Motorcycle Bus Car' )
421421
422- await act ( ( ) => {
422+ act ( ( ) => {
423423 result . current . switchLocale ( 'fr' )
424424 } )
425425
@@ -493,7 +493,7 @@ describe('i18n hook', () => {
493493 } ) ,
494494 ) . toEqual ( '12/17/1995' )
495495
496- await act ( ( ) => {
496+ act ( ( ) => {
497497 result . current . switchLocale ( 'fr' )
498498 } )
499499
@@ -530,7 +530,7 @@ describe('i18n hook', () => {
530530
531531 expect ( result . current . relativeTime ( date ) ) . toEqual ( 'over 20 years ago' )
532532
533- await act ( ( ) => {
533+ act ( ( ) => {
534534 result . current . switchLocale ( 'fr' )
535535 } )
536536
@@ -549,7 +549,7 @@ describe('i18n hook', () => {
549549 const date = new Date ( 'September 13, 2011 15:15:00' )
550550
551551 expect ( result . current . relativeTimeStrict ( date ) ) . toEqual ( '3499 days ago' )
552- await act ( ( ) => {
552+ act ( ( ) => {
553553 result . current . switchLocale ( 'fr' )
554554 } )
555555
@@ -570,7 +570,7 @@ describe('i18n hook', () => {
570570 expect (
571571 result . current . formatUnit ( 12 , { short : false , unit : 'byte' } ) ,
572572 ) . toEqual ( '12 bytes' )
573- await act ( ( ) => {
573+ act ( ( ) => {
574574 result . current . switchLocale ( 'fr' )
575575 } )
576576
@@ -591,7 +591,7 @@ describe('i18n hook', () => {
591591 expect (
592592 result . current . formatDate ( new Date ( 2020 , 1 , 13 , 16 , 28 ) , 'numericHour' ) ,
593593 ) . toEqual ( '2020-02-13 4:28 PM' )
594- await act ( ( ) => {
594+ act ( ( ) => {
595595 result . current . switchLocale ( 'fr' )
596596 } )
597597
0 commit comments