@@ -24,6 +24,31 @@ describe('Tracekit - Custom Tests', () => {
2424 ] ) ;
2525 } ) ;
2626
27+ it ( 'should parse exceptions for react-native-v8' , ( ) => {
28+ const REACT_NATIVE_V8_EXCEPTION = {
29+ message : 'Manually triggered crash to test Sentry reporting' ,
30+ name : 'Error' ,
31+ stack : `Error: Manually triggered crash to test Sentry reporting
32+ at Object.onPress(index.android.bundle:2342:3773)
33+ at s.touchableHandlePress(index.android.bundle:214:2048)
34+ at s._performSideEffectsForTransition(index.android.bundle:198:9608)
35+ at s._receiveSignal(index.android.bundle:198:8309)
36+ at s.touchableHandleResponderRelease(index.android.bundle:198:5615)
37+ at Object.y(index.android.bundle:93:571)
38+ at P(index.android.bundle:93:714)` ,
39+ } ;
40+ const stacktrace = computeStackTrace ( REACT_NATIVE_V8_EXCEPTION ) ;
41+ expect ( stacktrace . stack ) . deep . equal ( [
42+ { url : 'index.android.bundle' , func : 'Object.onPress' , args : [ ] , line : 2342 , column : 3773 } ,
43+ { url : 'index.android.bundle' , func : 's.touchableHandlePress' , args : [ ] , line : 214 , column : 2048 } ,
44+ { url : 'index.android.bundle' , func : 's._performSideEffectsForTransition' , args : [ ] , line : 198 , column : 9608 } ,
45+ { url : 'index.android.bundle' , func : 's._receiveSignal' , args : [ ] , line : 198 , column : 8309 } ,
46+ { url : 'index.android.bundle' , func : 's.touchableHandleResponderRelease' , args : [ ] , line : 198 , column : 5615 } ,
47+ { url : 'index.android.bundle' , func : 'Object.y' , args : [ ] , line : 93 , column : 571 } ,
48+ { url : 'index.android.bundle' , func : 'P' , args : [ ] , line : 93 , column : 714 } ,
49+ ] ) ;
50+ } ) ;
51+
2752 describe ( 'should parse exceptions with native code frames' , ( ) => {
2853 it ( 'in Chrome 73' , ( ) => {
2954 const CHROME73_NATIVE_CODE_EXCEPTION = {
0 commit comments