File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -456,6 +456,10 @@ describe('Rokt Forwarder', () => {
456456 window . Rokt = new MockRoktForwarder ( ) ;
457457 window . mParticle . Rokt = window . Rokt ;
458458 window . mParticle . Rokt . attachKitCalled = false ;
459+
460+ // Set attachKit as async to allow for await calls in the test
461+ // This is necessary to simiulate a race condition between the
462+ // core sdk and the Rokt forwarder
459463 window . mParticle . Rokt . attachKit = async ( kit ) => {
460464 window . mParticle . Rokt . attachKitCalled = true ;
461465 window . mParticle . Rokt . kit = kit ;
@@ -507,6 +511,11 @@ describe('Rokt Forwarder', () => {
507511 window . mParticle . forwarder . isInitialized . should . equal ( true ) ;
508512 } ) ;
509513
514+ // This test is to ensure the kit is initialized before attaching to the Rokt manager
515+ // so we can ensure that the Rokt Manager's message queue is processed and that
516+ // all the isReady() checks are properly handled in by the Rokt Manager.
517+ // This is to validate in case a bug that was found in the Rokt Manager's
518+ // queueing logic regresses.
510519 it ( 'should initialize the kit before calling queued messages' , async ( ) => {
511520 let queuedMessageCalled = false ;
512521 let wasKitInitializedFirst = false ;
You can’t perform that action at this time.
0 commit comments