@@ -9,7 +9,7 @@ import '../jest/mockXhrNetworkInterceotor';
9
9
import '../jest/mockInstabugUtils' ;
10
10
import sinon from 'sinon' ;
11
11
import CrashReporting from '../modules/CrashReporting' ;
12
- import { parseErrorStack } from '../utils/InstabugUtils' ;
12
+ import InstabugUtils from '../utils/InstabugUtils' ;
13
13
import Instabug from '../' ;
14
14
import IBGEventEmitter from '../utils/IBGEventEmitter' ;
15
15
import IBGConstants from '../utils/InstabugConstants' ;
@@ -44,7 +44,7 @@ describe('CrashReporting Module', () => {
44
44
it ( 'should call the native method sendHandledJSCrash when platform is ios' , ( ) => {
45
45
46
46
Platform . OS = 'ios' ;
47
- parseErrorStack . mockImplementation ( ( ) => 'javascriptStackTrace' ) ;
47
+ InstabugUtils . parseErrorStack . mockImplementation ( ( ) => 'javascriptStackTrace' ) ;
48
48
const errorObject = { name : 'TypeError' , message : 'Invalid type' } ;
49
49
CrashReporting . reportJSException ( errorObject ) ;
50
50
@@ -62,7 +62,7 @@ describe('CrashReporting Module', () => {
62
62
it ( 'should call the native method sendHandledJSCrash when platform is android' , ( ) => {
63
63
64
64
Platform . OS = 'android' ;
65
- parseErrorStack . mockImplementation ( ( ) => 'javascriptStackTrace' ) ;
65
+ InstabugUtils . parseErrorStack . mockImplementation ( ( ) => 'javascriptStackTrace' ) ;
66
66
const errorObject = { name : 'TypeError' , message : 'Invalid type' } ;
67
67
CrashReporting . reportJSException ( errorObject ) ;
68
68
@@ -81,8 +81,8 @@ describe('CrashReporting Module', () => {
81
81
it ( 'should emit event IBGSendHandledJSCrash with the error object when platform is android' , ( done ) => {
82
82
83
83
Platform . OS = 'android' ;
84
- parseErrorStack . mockImplementation ( ( ) => 'javascriptStackTrace' ) ;
85
- Instabug . _isOnReportHandlerSet = jest . fn ( ( ) => true ) ;
84
+ InstabugUtils . parseErrorStack . mockImplementation ( ( ) => 'javascriptStackTrace' ) ;
85
+ InstabugUtils . isOnReportHandlerSet . mockImplementation ( ( ) => true ) ;
86
86
87
87
const errorObject = { name : 'TypeError' , message : 'Invalid type' } ;
88
88
const expectedObject = {
0 commit comments