@@ -9,7 +9,7 @@ import '../jest/mockXhrNetworkInterceotor';
99import '../jest/mockInstabugUtils' ;
1010import sinon from 'sinon' ;
1111import CrashReporting from '../modules/CrashReporting' ;
12- import { parseErrorStack } from '../utils/InstabugUtils' ;
12+ import InstabugUtils from '../utils/InstabugUtils' ;
1313import Instabug from '../' ;
1414import IBGEventEmitter from '../utils/IBGEventEmitter' ;
1515import IBGConstants from '../utils/InstabugConstants' ;
@@ -44,7 +44,7 @@ describe('CrashReporting Module', () => {
4444 it ( 'should call the native method sendHandledJSCrash when platform is ios' , ( ) => {
4545
4646 Platform . OS = 'ios' ;
47- parseErrorStack . mockImplementation ( ( ) => 'javascriptStackTrace' ) ;
47+ InstabugUtils . parseErrorStack . mockImplementation ( ( ) => 'javascriptStackTrace' ) ;
4848 const errorObject = { name : 'TypeError' , message : 'Invalid type' } ;
4949 CrashReporting . reportJSException ( errorObject ) ;
5050
@@ -62,7 +62,7 @@ describe('CrashReporting Module', () => {
6262 it ( 'should call the native method sendHandledJSCrash when platform is android' , ( ) => {
6363
6464 Platform . OS = 'android' ;
65- parseErrorStack . mockImplementation ( ( ) => 'javascriptStackTrace' ) ;
65+ InstabugUtils . parseErrorStack . mockImplementation ( ( ) => 'javascriptStackTrace' ) ;
6666 const errorObject = { name : 'TypeError' , message : 'Invalid type' } ;
6767 CrashReporting . reportJSException ( errorObject ) ;
6868
@@ -81,8 +81,8 @@ describe('CrashReporting Module', () => {
8181 it ( 'should emit event IBGSendHandledJSCrash with the error object when platform is android' , ( done ) => {
8282
8383 Platform . OS = 'android' ;
84- parseErrorStack . mockImplementation ( ( ) => 'javascriptStackTrace' ) ;
85- Instabug . _isOnReportHandlerSet = jest . fn ( ( ) => true ) ;
84+ InstabugUtils . parseErrorStack . mockImplementation ( ( ) => 'javascriptStackTrace' ) ;
85+ InstabugUtils . isOnReportHandlerSet . mockImplementation ( ( ) => true ) ;
8686
8787 const errorObject = { name : 'TypeError' , message : 'Invalid type' } ;
8888 const expectedObject = {
0 commit comments