@@ -545,14 +545,14 @@ describe('createQueryNormalizer', () => {
545545 } ) ;
546546
547547 // Set isInvalidated on the query.
548- client . invalidateQueries ( { queryKey : [ 'book' ] } ) ;
548+ await client . invalidateQueries ( { queryKey : [ 'book' ] } ) ;
549549
550- let state1 = client . getQueryCache ( ) . find ( { queryKey : [ 'book' ] } ) ?. state ;
550+ const state1 = client . getQueryCache ( ) . find ( { queryKey : [ 'book' ] } ) ?. state ;
551551
552- let dataUpdatedAt1 = state1 ?. dataUpdatedAt ;
553- let isInvalidated1 = state1 ?. isInvalidated ;
554- let error1 = state1 ?. error ;
555- let status1 = state1 ?. status ;
552+ const dataUpdatedAt1 = state1 ?. dataUpdatedAt ;
553+ const isInvalidated1 = state1 ?. isInvalidated ;
554+ const error1 = state1 ?. error ;
555+ const status1 = state1 ?. status ;
556556
557557 await sleep ( 1 ) ;
558558
@@ -561,12 +561,12 @@ describe('createQueryNormalizer', () => {
561561 name : 'Name updated' ,
562562 } ) ;
563563
564- let state2 = client . getQueryCache ( ) . find ( { queryKey : [ 'book' ] } ) ?. state ;
564+ const state2 = client . getQueryCache ( ) . find ( { queryKey : [ 'book' ] } ) ?. state ;
565565
566- let dataUpdatedAt2 = state2 ?. dataUpdatedAt ;
567- let isInvalidated2 = state2 ?. isInvalidated ;
568- let error2 = state2 ?. error ;
569- let status2 = state2 ?. status ;
566+ const dataUpdatedAt2 = state2 ?. dataUpdatedAt ;
567+ const isInvalidated2 = state2 ?. isInvalidated ;
568+ const error2 = state2 ?. error ;
569+ const status2 = state2 ?. status ;
570570
571571 expect ( dataUpdatedAt1 ) . toEqual ( dataUpdatedAt2 ) ;
572572 expect ( isInvalidated1 ) . toEqual ( isInvalidated2 ) ;
0 commit comments