@@ -2032,7 +2032,7 @@ describe('forwarders', function() {
20322032 } ) ;
20332033 } ) ;
20342034
2035- it ( 'should not forward event if event attribute forwarding rule is set and includeOnMatch is false' , function ( done ) {
2035+ it ( 'should not forward event if event attribute forwarding rule is set and includeOnMatch is false' , async ( ) => {
20362036 mParticle . _resetForTests ( MPConfig ) ;
20372037 const mockForwarder = new MockForwarder ( ) ;
20382038 mockForwarder . register ( window . mParticle . config ) ;
@@ -2048,12 +2048,8 @@ describe('forwarders', function() {
20482048 window . mParticle . config . kitConfigs . push ( config1 ) ;
20492049
20502050 mParticle . init ( apiKey , window . mParticle . config ) ;
2051- waitForCondition ( ( ) => {
2052- return (
2053- window . mParticle . getInstance ( ) ?. _Store ?. identityCallInFlight === false
2054- ) ;
2055- } )
2056- . then ( ( ) => {
2051+ await waitForCondition ( hasIdentityCallInflightReturned ) ;
2052+
20572053 window . MockForwarder1 . instance . receivedEvent . EventName . should . equal ( 1 ) ;
20582054 window . MockForwarder1 . instance . receivedEvent = null ;
20592055
@@ -2069,8 +2065,6 @@ describe('forwarders', function() {
20692065
20702066 Should ( event ) . not . be . ok ( ) ;
20712067
2072- done ( ) ;
2073- } ) ;
20742068 } ) ;
20752069
20762070 it ( 'should forward event if event attribute forwarding rule is set and includeOnMatch is false but attributes do not match' , async ( ) => {
@@ -2090,11 +2084,7 @@ describe('forwarders', function() {
20902084 window . mParticle . config . kitConfigs . push ( config1 ) ;
20912085
20922086 mParticle . init ( apiKey , window . mParticle . config ) ;
2093- await waitForCondition ( ( ) => {
2094- return (
2095- window . mParticle . getInstance ( ) ?. _Store ?. identityCallInFlight === false
2096- ) ;
2097- } )
2087+ await waitForCondition ( hasIdentityCallInflightReturned ) ;
20982088
20992089 window . MockForwarder1 . instance . receivedEvent . EventName . should . equal ( 1 ) ;
21002090 window . MockForwarder1 . instance . receivedEvent = null ;
0 commit comments