@@ -325,14 +325,14 @@ describe('OnyxUtils', () => {
325325 } ) ;
326326 } ,
327327 afterEach : async ( ) => {
328- await clearOnyxAfterEachMeasure ( ) ;
329328 mockedReportActionsKeys . forEach ( ( key ) => {
330329 const id = subscriptionMap . get ( key ) ;
331330 if ( id ) {
332331 OnyxUtils . unsubscribeFromKey ( id ) ;
333332 }
334333 } ) ;
335334 subscriptionMap . clear ( ) ;
335+ await clearOnyxAfterEachMeasure ( ) ;
336336 } ,
337337 } ) ;
338338 } ) ;
@@ -355,11 +355,11 @@ describe('OnyxUtils', () => {
355355 }
356356 } ,
357357 afterEach : async ( ) => {
358- await clearOnyxAfterEachMeasure ( ) ;
359358 subscriptionIDs . forEach ( ( id ) => {
360359 OnyxUtils . unsubscribeFromKey ( id ) ;
361360 } ) ;
362361 subscriptionIDs . clear ( ) ;
362+ await clearOnyxAfterEachMeasure ( ) ;
363363 } ,
364364 } ) ;
365365 } ) ;
@@ -388,10 +388,10 @@ describe('OnyxUtils', () => {
388388 subscriptionID = OnyxUtils . subscribeToKey ( { key : collectionKey , callback : jest . fn ( ) , initWithStoredValues : false } ) ;
389389 } ,
390390 afterEach : async ( ) => {
391- await clearOnyxAfterEachMeasure ( ) ;
392391 if ( subscriptionID ) {
393392 OnyxUtils . unsubscribeFromKey ( subscriptionID ) ;
394393 }
394+ await clearOnyxAfterEachMeasure ( ) ;
395395 } ,
396396 } ,
397397 ) ;
@@ -421,10 +421,10 @@ describe('OnyxUtils', () => {
421421 subscriptionID = OnyxUtils . subscribeToKey ( { key : collectionKey , callback : jest . fn ( ) , initWithStoredValues : false } ) ;
422422 } ,
423423 afterEach : async ( ) => {
424- await clearOnyxAfterEachMeasure ( ) ;
425424 if ( subscriptionID ) {
426425 OnyxUtils . unsubscribeFromKey ( subscriptionID ) ;
427426 }
427+ await clearOnyxAfterEachMeasure ( ) ;
428428 } ,
429429 } ,
430430 ) ;
@@ -470,10 +470,10 @@ describe('OnyxUtils', () => {
470470 await Onyx . multiSet ( mockedReportActionsMap ) ;
471471 } ,
472472 afterEach : async ( ) => {
473- await clearOnyxAfterEachMeasure ( ) ;
474473 if ( subscriptionID ) {
475474 OnyxUtils . unsubscribeFromKey ( subscriptionID ) ;
476475 }
476+ await clearOnyxAfterEachMeasure ( ) ;
477477 } ,
478478 } ,
479479 ) ;
@@ -499,14 +499,14 @@ describe('OnyxUtils', () => {
499499 } ) ;
500500 } ,
501501 afterEach : async ( ) => {
502- await clearOnyxAfterEachMeasure ( ) ;
503502 mockedReportActionsKeys . forEach ( ( key ) => {
504503 const id = subscriptionMap . get ( key ) ;
505504 if ( id ) {
506505 OnyxUtils . unsubscribeFromKey ( id ) ;
507506 }
508507 } ) ;
509508 subscriptionMap . clear ( ) ;
509+ await clearOnyxAfterEachMeasure ( ) ;
510510 } ,
511511 } ,
512512 ) ;
@@ -530,14 +530,14 @@ describe('OnyxUtils', () => {
530530 } ) ;
531531 } ,
532532 afterEach : async ( ) => {
533- await clearOnyxAfterEachMeasure ( ) ;
534533 mockedReportActionsKeys . forEach ( ( key ) => {
535534 const id = subscriptionMap . get ( key ) ;
536535 if ( id ) {
537536 OnyxUtils . unsubscribeFromKey ( id ) ;
538537 }
539538 } ) ;
540539 subscriptionMap . clear ( ) ;
540+ await clearOnyxAfterEachMeasure ( ) ;
541541 } ,
542542 } ) ;
543543 } ) ;
@@ -730,8 +730,8 @@ describe('OnyxUtils', () => {
730730 await StorageMock . multiSet ( Object . entries ( mockedReportActionsMap ) . map ( ( [ k , v ] ) => [ k , v ] ) ) ;
731731 } ,
732732 afterEach : async ( ) => {
733- await clearOnyxAfterEachMeasure ( ) ;
734733 OnyxUtils . unsubscribeFromKey ( subscriptionID ) ;
734+ await clearOnyxAfterEachMeasure ( ) ;
735735 } ,
736736 } ,
737737 ) ;
@@ -757,8 +757,8 @@ describe('OnyxUtils', () => {
757757 await StorageMock . multiSet ( Object . entries ( mockedReportActionsMap ) . map ( ( [ k , v ] ) => [ k , v ] ) ) ;
758758 } ,
759759 afterEach : async ( ) => {
760- await clearOnyxAfterEachMeasure ( ) ;
761760 OnyxUtils . unsubscribeFromKey ( subscriptionID ) ;
761+ await clearOnyxAfterEachMeasure ( ) ;
762762 } ,
763763 } ,
764764 ) ;
@@ -826,9 +826,9 @@ describe('OnyxUtils', () => {
826826 } ) ;
827827 } ,
828828 afterEach : async ( ) => {
829- await clearOnyxAfterEachMeasure ( ) ;
830829 OnyxUtils . deleteKeyBySubscriptions ( subscriptionID ) ;
831830 OnyxUtils . unsubscribeFromKey ( subscriptionID ) ;
831+ await clearOnyxAfterEachMeasure ( ) ;
832832 } ,
833833 } ) ;
834834 } ) ;
@@ -848,8 +848,8 @@ describe('OnyxUtils', () => {
848848 OnyxUtils . storeKeyBySubscriptions ( key , subscriptionID ) ;
849849 } ,
850850 afterEach : async ( ) => {
851- await clearOnyxAfterEachMeasure ( ) ;
852851 OnyxUtils . unsubscribeFromKey ( subscriptionID ) ;
852+ await clearOnyxAfterEachMeasure ( ) ;
853853 } ,
854854 } ) ;
855855 } ) ;
@@ -869,8 +869,8 @@ describe('OnyxUtils', () => {
869869 } ) ,
870870 {
871871 afterEach : async ( ) => {
872- await clearOnyxAfterEachMeasure ( ) ;
873872 OnyxCache . removeLastAccessedKey ( key ) ;
873+ await clearOnyxAfterEachMeasure ( ) ;
874874 } ,
875875 } ,
876876 ) ;
0 commit comments