@@ -49,16 +49,16 @@ describe('cookie syncing', function() {
4949 const element = create . apply ( this , arguments as unknown as [ string , ElementCreationOptions ?] ) ;
5050
5151 if ( element . tagName === 'IMG' ) {
52- // Add an `onload` mock that simulates the browser loading the image
53- Object . defineProperty ( element , 'onload' , {
54- set ( callback ) {
55- // Automatically invoke the callback to simulate the `load` event
56- callback ( new Event ( 'load' ) ) ;
57- } ,
58- } ) ;
59- }
52+ // Add an `onload` mock that simulates the browser loading the image
53+ Object . defineProperty ( element , 'onload' , {
54+ set ( callback ) {
55+ // Automatically invoke the callback to simulate the `load` event
56+ callback ( new Event ( 'load' ) ) ;
57+ } ,
58+ } ) ;
59+ }
6060
61- return element ;
61+ return element ;
6262
6363 } ;
6464 } ) ( document . createElement ) ;
@@ -161,11 +161,7 @@ describe('cookie syncing', function() {
161161 } ) ;
162162
163163 mParticle . Identity . login ( ) ;
164- await waitForCondition ( ( ) => {
165- return (
166- mParticle . Identity . getCurrentUser ( ) ?. getMPID ( ) === 'otherMPID'
167- ) ;
168- } )
164+ await waitForCondition ( ( ) => mParticle . Identity . getCurrentUser ( ) ?. getMPID ( ) === 'otherMPID' )
169165 const data2 = mParticle
170166 . getInstance ( )
171167 . _Persistence . getLocalStorage ( ) ;
@@ -284,11 +280,7 @@ describe('cookie syncing', function() {
284280 mParticle . Identity . login ( {
285281 userIdentities : { customerid : 'abc' } ,
286282 } ) ;
287- await waitForCondition ( ( ) => {
288- return (
289- mParticle . Identity . getCurrentUser ( ) ?. getMPID ( ) === 'MPID1'
290- ) ;
291- } )
283+ await waitForCondition ( ( ) => mParticle . Identity . getCurrentUser ( ) ?. getMPID ( ) === 'MPID1' ) ;
292284 const cookies = getLocalStorage ( ) ;
293285 Object . keys ( cookies [ 'MPID1' ] . csd ) . length . should . equal ( 1 ) ;
294286 } ) ;
@@ -313,7 +305,7 @@ describe('cookie syncing', function() {
313305
314306 mParticle . init ( apiKey , window . mParticle . config ) ;
315307
316- await waitForCondition ( hasIdentifyReturned )
308+ await waitForCondition ( hasIdentifyReturned ) ;
317309
318310 expect (
319311 mParticle . getInstance ( ) . _Store . pixelConfigurations . length
@@ -912,7 +904,7 @@ describe('cookie syncing', function() {
912904 } ) ;
913905
914906 it ( 'should perform a cookie sync only after GDPR consent is given when consent is required - perform a cookie sync when consent is rejected' , async ( ) => {
915- await waitForCondition ( hasIdentifyReturned )
907+ await waitForCondition ( hasIdentifyReturned ) ;
916908
917909 const includeOnMatch = false ; // 'Do Not Forward' chosen in UI, 'includeOnMatch' in config
918910 const consented = false ;
@@ -934,7 +926,7 @@ describe('cookie syncing', function() {
934926
935927 mParticle . init ( apiKey , window . mParticle . config ) ;
936928
937- await waitForCondition ( hasIdentifyReturned )
929+ await waitForCondition ( hasIdentifyReturned ) ;
938930 const localStorage = mParticle
939931 . getInstance ( )
940932 . _Persistence . getLocalStorage ( ) ;
@@ -996,7 +988,7 @@ describe('cookie syncing', function() {
996988
997989 mParticle . init ( apiKey , window . mParticle . config ) ;
998990
999- await waitForCondition ( hasIdentifyReturned )
991+ await waitForCondition ( hasIdentifyReturned ) ;
1000992
1001993 const localStorage = mParticle
1002994 . getInstance ( )
@@ -1039,7 +1031,7 @@ describe('cookie syncing', function() {
10391031 } ) ;
10401032
10411033 it ( 'should perform a cookie sync only after CCPA consent is given when consent is required - perform a cookie sync when consent is rejected' , async ( ) => {
1042- await waitForCondition ( hasIdentifyReturned )
1034+ await waitForCondition ( hasIdentifyReturned ) ;
10431035
10441036 const includeOnMatch = false ; // 'Do Not Forward' chosen in UI, 'includeOnMatch' in config
10451037 const consented = false ;
@@ -1061,7 +1053,7 @@ describe('cookie syncing', function() {
10611053
10621054 mParticle . init ( apiKey , window . mParticle . config ) ;
10631055
1064- await waitForCondition ( hasIdentifyReturned )
1056+ await waitForCondition ( hasIdentifyReturned ) ;
10651057 const localStorage = mParticle
10661058 . getInstance ( )
10671059 . _Persistence . getLocalStorage ( ) ;
@@ -1151,7 +1143,7 @@ describe('cookie syncing', function() {
11511143
11521144 mParticle . init ( apiKey , window . mParticle . config ) ;
11531145
1154- await waitForCondition ( hasIdentifyReturned )
1146+ await waitForCondition ( hasIdentifyReturned ) ;
11551147
11561148 const localStorage = mParticle
11571149 . getInstance ( )
0 commit comments