@@ -4,7 +4,7 @@ import type { Event } from '@sentry/types';
4
4
import { Platform } from 'react-native' ;
5
5
6
6
import { createReactNativeRewriteFrames } from '../../src/js/integrations/rewriteframes' ;
7
- import { isExpo } from '../../src/js/utils/environment' ;
7
+ import { isExpo , isHermesEnabled } from '../../src/js/utils/environment' ;
8
8
import { mockFunction } from '../testutils' ;
9
9
10
10
jest . mock ( '../../src/js/utils/environment' ) ;
@@ -29,6 +29,7 @@ describe('RewriteFrames', () => {
29
29
30
30
beforeEach ( ( ) => {
31
31
mockFunction ( isExpo ) . mockReturnValue ( false ) ;
32
+ mockFunction ( isHermesEnabled ) . mockReturnValue ( false ) ;
32
33
jest . resetAllMocks ( ) ;
33
34
} ) ;
34
35
@@ -668,6 +669,8 @@ describe('RewriteFrames', () => {
668
669
} ) ;
669
670
670
671
it ( 'should parse React Native errors on Android Hermes' , async ( ) => {
672
+ mockFunction ( isHermesEnabled ) . mockReturnValue ( true ) ;
673
+
671
674
const ANDROID_REACT_NATIVE_HERMES = {
672
675
message : 'Error: lets throw!' ,
673
676
name : 'Error' ,
@@ -714,28 +717,28 @@ describe('RewriteFrames', () => {
714
717
filename : 'app:///index.android.bundle' ,
715
718
function : 'value' ,
716
719
lineno : 1 ,
717
- colno : 31561 ,
720
+ colno : 31562 ,
718
721
in_app : true ,
719
722
} ,
720
723
{
721
724
filename : 'app:///index.android.bundle' ,
722
725
function : 'value' ,
723
726
lineno : 1 ,
724
- colno : 32776 ,
727
+ colno : 32777 ,
725
728
in_app : true ,
726
729
} ,
727
730
{
728
731
filename : 'app:///index.android.bundle' ,
729
732
function : 'anonymous' ,
730
733
lineno : 1 ,
731
- colno : 31603 ,
734
+ colno : 31604 ,
732
735
in_app : true ,
733
736
} ,
734
737
{
735
738
filename : 'app:///index.android.bundle' ,
736
739
function : 'value' ,
737
740
lineno : 1 ,
738
- colno : 33176 ,
741
+ colno : 33177 ,
739
742
in_app : true ,
740
743
} ,
741
744
{
@@ -747,42 +750,42 @@ describe('RewriteFrames', () => {
747
750
filename : 'app:///index.android.bundle' ,
748
751
function : 'receiveTouches' ,
749
752
lineno : 1 ,
750
- colno : 122512 ,
753
+ colno : 122513 ,
751
754
in_app : true ,
752
755
} ,
753
756
{
754
757
filename : 'app:///index.android.bundle' ,
755
758
function : 'Ue' ,
756
759
lineno : 1 ,
757
- colno : 77571 ,
760
+ colno : 77572 ,
758
761
in_app : true ,
759
762
} ,
760
763
{
761
764
filename : 'app:///index.android.bundle' ,
762
765
function : 'Ne' ,
763
766
lineno : 1 ,
764
- colno : 77238 ,
767
+ colno : 77239 ,
765
768
in_app : true ,
766
769
} ,
767
770
{
768
771
filename : 'app:///index.android.bundle' ,
769
772
function : '_e' ,
770
773
lineno : 1 ,
771
- colno : 127755 ,
774
+ colno : 127756 ,
772
775
in_app : true ,
773
776
} ,
774
777
{
775
778
filename : 'app:///index.android.bundle' ,
776
779
function : 'anonymous' ,
777
780
lineno : 1 ,
778
- colno : 77747 ,
781
+ colno : 77748 ,
779
782
in_app : true ,
780
783
} ,
781
784
{
782
785
filename : 'app:///index.android.bundle' ,
783
786
function : 'z' ,
784
787
lineno : 1 ,
785
- colno : 74642 ,
788
+ colno : 74643 ,
786
789
in_app : true ,
787
790
} ,
788
791
{
@@ -794,37 +797,37 @@ describe('RewriteFrames', () => {
794
797
filename : 'app:///index.android.bundle' ,
795
798
function : 'A' ,
796
799
lineno : 1 ,
797
- colno : 74709 ,
800
+ colno : 74710 ,
798
801
in_app : true ,
799
802
} ,
800
803
{
801
804
filename : 'app:///index.android.bundle' ,
802
805
function : 'N' ,
803
806
lineno : 1 ,
804
- colno : 74267 ,
807
+ colno : 74268 ,
805
808
in_app : true ,
806
809
} ,
807
810
{
808
811
filename : 'app:///index.android.bundle' ,
809
812
function : 'C' ,
810
813
lineno : 1 ,
811
- colno : 74126 ,
814
+ colno : 74127 ,
812
815
in_app : true ,
813
816
} ,
814
817
{ filename : 'native' , function : 'apply' , in_app : true } ,
815
818
{
816
819
filename : 'app:///index.android.bundle' ,
817
820
function : 'k' ,
818
821
lineno : 1 ,
819
- colno : 74094 ,
822
+ colno : 74095 ,
820
823
in_app : true ,
821
824
} ,
822
825
{ filename : 'native' , function : 'apply' , in_app : true } ,
823
826
{
824
827
filename : 'app:///index.android.bundle' ,
825
828
function : 'b' ,
826
829
lineno : 1 ,
827
- colno : 74037 ,
830
+ colno : 74038 ,
828
831
in_app : true ,
829
832
} ,
830
833
{ filename : 'native' , function : 'apply' , in_app : true } ,
@@ -835,21 +838,21 @@ describe('RewriteFrames', () => {
835
838
filename : 'app:///index.android.bundle' ,
836
839
function : '_performSideEffectsForTransition' ,
837
840
lineno : 1 ,
838
- colno : 230843 ,
841
+ colno : 230844 ,
839
842
in_app : true ,
840
843
} ,
841
844
{
842
845
filename : 'app:///index.android.bundle' ,
843
846
function : 'anonymous' ,
844
847
lineno : 1 ,
845
- colno : 224280 ,
848
+ colno : 224281 ,
846
849
in_app : true ,
847
850
} ,
848
851
{
849
852
filename : 'app:///index.android.bundle' ,
850
853
function : 'onPress' ,
851
854
lineno : 1 ,
852
- colno : 452701 ,
855
+ colno : 452702 ,
853
856
in_app : true ,
854
857
} ,
855
858
] ,
0 commit comments