@@ -117,7 +117,7 @@ describe('Tests ReactNativeClient', () => {
117117 } ) ;
118118
119119 await expect ( client . eventFromMessage ( 'test' ) ) . resolves . toBeDefined ( ) ;
120- await expect ( RN . LogBox . ignoreLogs ) . not . toBeCalled ( ) ;
120+ await expect ( RN . LogBox . ignoreLogs ) . not . toHaveBeenCalled ( ) ;
121121 } ) ;
122122
123123 test ( 'invalid dsn is thrown' , ( ) => {
@@ -168,7 +168,7 @@ describe('Tests ReactNativeClient', () => {
168168
169169 client . captureMessage ( 'This message will never be sent because the client is disabled.' ) ;
170170
171- expect ( mockTransport . send ) . not . toBeCalled ( ) ;
171+ expect ( mockTransport . send ) . not . toHaveBeenCalled ( ) ;
172172 } ) ;
173173
174174 test ( 'captureException does not call transport when enabled false' , ( ) => {
@@ -177,7 +177,7 @@ describe('Tests ReactNativeClient', () => {
177177
178178 client . captureException ( new Error ( 'This exception will never be sent because the client is disabled.' ) ) ;
179179
180- expect ( mockTransport . send ) . not . toBeCalled ( ) ;
180+ expect ( mockTransport . send ) . not . toHaveBeenCalled ( ) ;
181181 } ) ;
182182
183183 test ( 'captureEvent does not call transport when enabled false' , ( ) => {
@@ -188,7 +188,7 @@ describe('Tests ReactNativeClient', () => {
188188 message : 'This event will never be sent because the client is disabled.' ,
189189 } ) ;
190190
191- expect ( mockTransport . send ) . not . toBeCalled ( ) ;
191+ expect ( mockTransport . send ) . not . toHaveBeenCalled ( ) ;
192192 } ) ;
193193
194194 test ( 'captureSession does not call transport when enabled false' , ( ) => {
@@ -197,16 +197,17 @@ describe('Tests ReactNativeClient', () => {
197197
198198 client . captureSession ( getMockSession ( ) ) ;
199199
200- expect ( mockTransport . send ) . not . toBeCalled ( ) ;
200+ expect ( mockTransport . send ) . not . toHaveBeenCalled ( ) ;
201201 } ) ;
202202
203+ // TODO: Replacy by Sentry.captureFeedback
203204 test ( 'captureUserFeedback does not call transport when enabled false' , ( ) => {
204205 const mockTransport = createMockTransport ( ) ;
205206 const client = createDisabledClientWith ( mockTransport ) ;
206207
207208 client . captureUserFeedback ( getMockUserFeedback ( ) ) ;
208209
209- expect ( mockTransport . send ) . not . toBeCalled ( ) ;
210+ expect ( mockTransport . send ) . not . toHaveBeenCalled ( ) ;
210211 } ) ;
211212
212213 function createDisabledClientWith ( transport : Transport ) {
@@ -298,7 +299,7 @@ describe('Tests ReactNativeClient', () => {
298299 } ) ;
299300 client . nativeCrash ( ) ;
300301
301- expect ( RN . NativeModules . RNSentry . crash ) . toBeCalled ( ) ;
302+ expect ( RN . NativeModules . RNSentry . crash ) . toHaveBeenCalled ( ) ;
302303 } ) ;
303304 } ) ;
304305
@@ -452,7 +453,7 @@ describe('Tests ReactNativeClient', () => {
452453
453454 client . captureEvent ( { message : 'test event' } ) ;
454455
455- expect ( mockedSend ) . toBeCalled ( ) ;
456+ expect ( mockedSend ) . toHaveBeenCalled ( ) ;
456457 const actualEvent : Event | undefined = < Event > (
457458 mockedSend . mock . calls [ 0 ] [ firstArg ] [ envelopeItems ] [ 0 ] [ envelopeItemPayload ]
458459 ) ;
@@ -486,7 +487,7 @@ describe('Tests ReactNativeClient', () => {
486487
487488 client . captureEvent ( circularEvent ) ;
488489
489- expect ( mockedSend ) . toBeCalled ( ) ;
490+ expect ( mockedSend ) . toHaveBeenCalled ( ) ;
490491 const actualEvent : Event | undefined = < Event > (
491492 mockedSend . mock . calls [ 0 ] [ firstArg ] [ envelopeItems ] [ 0 ] [ envelopeItemPayload ]
492493 ) ;
@@ -534,7 +535,7 @@ describe('Tests ReactNativeClient', () => {
534535
535536 client . captureMessage ( 'message_test_value' ) ;
536537
537- expect ( mockTransportSend ) . toBeCalledTimes ( 1 ) ;
538+ expect ( mockTransportSend ) . toHaveBeenCalledTimes ( 1 ) ;
538539 expect ( mockTransportSend . mock . calls [ 0 ] [ firstArg ] [ envelopeItems ] [ 1 ] [ envelopeItemHeader ] ) . toEqual ( {
539540 type : 'client_report' ,
540541 } ) ;
@@ -607,7 +608,7 @@ describe('Tests ReactNativeClient', () => {
607608 mockDroppedEvent ( client ) ;
608609 client . captureMessage ( 'message_test_value_2' ) ;
609610
610- expect ( mockTransportSend ) . toBeCalledTimes ( 2 ) ;
611+ expect ( mockTransportSend ) . toHaveBeenCalledTimes ( 2 ) ;
611612 expect ( mockTransportSend . mock . calls [ 0 ] [ firstArg ] [ envelopeItems ] . length ) . toEqual ( 2 ) ;
612613 expect ( mockTransportSend . mock . calls [ 0 ] [ firstArg ] [ envelopeItems ] [ 1 ] [ envelopeItemHeader ] ) . toEqual ( {
613614 type : 'client_report' ,
@@ -627,7 +628,7 @@ describe('Tests ReactNativeClient', () => {
627628 } ) ;
628629
629630 function expectOnlyMessageEventInEnvelope ( transportSend : jest . Mock ) {
630- expect ( transportSend ) . toBeCalledTimes ( 1 ) ;
631+ expect ( transportSend ) . toHaveBeenCalledTimes ( 1 ) ;
631632 expect ( transportSend . mock . calls [ 0 ] [ firstArg ] [ envelopeItems ] ) . toHaveLength ( 1 ) ;
632633 expect ( transportSend . mock . calls [ 0 ] [ firstArg ] [ envelopeItems ] [ 0 ] [ envelopeItemHeader ] ) . toEqual (
633634 expect . objectContaining ( { type : 'event' } ) ,
0 commit comments