11import { NativeEventEmitter } from 'react-native' ;
22
3- import { IterableLogger } from '../core' ;
4-
53import { MockRNIterableAPI } from '../__mocks__/MockRNIterableAPI' ;
64
75import {
@@ -21,7 +19,6 @@ import {
2119describe ( 'Iterable In App' , ( ) => {
2220 beforeEach ( ( ) => {
2321 jest . clearAllMocks ( ) ;
24- Iterable . logger = new IterableLogger ( new IterableConfig ( ) ) ;
2522 } ) ;
2623
2724 test ( 'trackInAppOpen_params_methodCalledWithParams' , ( ) => {
@@ -202,9 +199,11 @@ describe('Iterable In App', () => {
202199 // WHEN the simulated local queue is set to the in-app messages
203200 MockRNIterableAPI . setMessages ( messages ) ;
204201 // THEN Iterable.inAppManager.getMessages returns the list of in-app messages
205- return await Iterable . inAppManager ?. getMessages ( ) . then ( ( messagesObtained ) => {
206- expect ( messagesObtained ) . toEqual ( messages ) ;
207- } ) ;
202+ return await Iterable . inAppManager
203+ ?. getMessages ( )
204+ . then ( ( messagesObtained ) => {
205+ expect ( messagesObtained ) . toEqual ( messages ) ;
206+ } ) ;
208207 } ) ;
209208
210209 test ( 'showMessage_messageAndConsume_returnsClickedUrl' , async ( ) => {
@@ -222,9 +221,11 @@ describe('Iterable In App', () => {
222221 // WHEN the simulated clicked url is set to the clicked url
223222 MockRNIterableAPI . setClickedUrl ( clickedUrl ) ;
224223 // THEN Iterable,inAppManager.showMessage returns the simulated clicked url
225- return await Iterable . inAppManager ?. showMessage ( message , consume ) . then ( ( url ) => {
226- expect ( url ) . toEqual ( clickedUrl ) ;
227- } ) ;
224+ return await Iterable . inAppManager
225+ ?. showMessage ( message , consume )
226+ . then ( ( url ) => {
227+ expect ( url ) . toEqual ( clickedUrl ) ;
228+ } ) ;
228229 } ) ;
229230
230231 test ( 'removeMessage_params_methodCalledWithParams' , ( ) => {
0 commit comments