@@ -689,7 +689,7 @@ describe('globals', function() {
689
689
frames : framesFlipped
690
690
} ,
691
691
culprit : 'http://example.com/file1.js' ,
692
- message : 'lol at 10 '
692
+ message : 'Error: lol '
693
693
} ] ) ;
694
694
695
695
processException ( 'Error' , 'lol' , '' , 10 , frames . slice ( 0 ) , { } ) ;
@@ -702,7 +702,7 @@ describe('globals', function() {
702
702
frames : framesFlipped
703
703
} ,
704
704
culprit : 'http://example.com/file1.js' ,
705
- message : 'lol at 10 '
705
+ message : 'Error: lol '
706
706
} ] ) ;
707
707
708
708
processException ( 'Error' , 'lol' , '' , 10 , frames . slice ( 0 ) , { extra : 'awesome' } ) ;
@@ -715,7 +715,7 @@ describe('globals', function() {
715
715
frames : framesFlipped
716
716
} ,
717
717
culprit : 'http://example.com/file1.js' ,
718
- message : 'lol at 10 ' ,
718
+ message : 'Error: lol ' ,
719
719
extra : 'awesome'
720
720
} ] ) ;
721
721
} ) ;
@@ -737,7 +737,7 @@ describe('globals', function() {
737
737
} ]
738
738
} ,
739
739
culprit : 'http://example.com/override.js' ,
740
- message : 'lol at 10 '
740
+ message : 'Error: lol '
741
741
} ] ) ;
742
742
743
743
processException ( 'Error' , 'lol' , 'http://example.com/override.js' , 10 , [ ] , { } ) ;
@@ -754,7 +754,7 @@ describe('globals', function() {
754
754
} ]
755
755
} ,
756
756
culprit : 'http://example.com/override.js' ,
757
- message : 'lol at 10'
757
+ message : 'Error: lol' ,
758
758
} ] ) ;
759
759
760
760
processException ( 'Error' , 'lol' , 'http://example.com/override.js' , 10 , [ ] , { extra : 'awesome' } ) ;
@@ -771,21 +771,11 @@ describe('globals', function() {
771
771
} ]
772
772
} ,
773
773
culprit : 'http://example.com/override.js' ,
774
- message : 'lol at 10 ' ,
774
+ message : 'Error: lol ' ,
775
775
extra : 'awesome'
776
776
} ] ) ;
777
777
} ) ;
778
778
779
- it ( 'should ignored falsey messages' , function ( ) {
780
- this . sinon . stub ( window , 'send' ) ;
781
-
782
- processException ( 'Error' , '' , 'http://example.com' , [ ] ) ;
783
- assert . isFalse ( window . send . called ) ;
784
-
785
- processException ( 'TypeError' , '' , 'http://example.com' , [ ] ) ;
786
- assert . isTrue ( window . send . called ) ;
787
- } ) ;
788
-
789
779
it ( 'should not blow up with `undefined` message' , function ( ) {
790
780
this . sinon . stub ( window , 'send' ) ;
791
781
@@ -796,36 +786,19 @@ describe('globals', function() {
796
786
it ( 'should truncate messages to the specified length' , function ( ) {
797
787
this . sinon . stub ( window , 'send' ) ;
798
788
799
- processException ( 'TypeError' , new Array ( 500 ) . join ( 'a' ) , 'http://example.com' , [ ] ) ;
800
- assert . deepEqual ( window . send . lastCall . args , [ {
801
- message : new Array ( 101 ) . join ( 'a' ) + '\u2026 at ' ,
802
- exception : {
803
- type : 'TypeError' ,
804
- value : new Array ( 101 ) . join ( 'a' ) + '\u2026'
805
- } ,
806
- stacktrace : {
807
- frames : [ {
808
- filename : 'http://example.com' ,
809
- lineno : [ ] ,
810
- in_app : true
811
- } ]
812
- } ,
813
- culprit : 'http://example.com' ,
814
- } ] ) ;
815
-
816
789
globalOptions . maxMessageLength = 150 ;
817
790
818
- processException ( 'TypeError' , new Array ( 500 ) . join ( 'a' ) , 'http://example.com' , [ ] ) ;
791
+ processException ( 'TypeError' , new Array ( 500 ) . join ( 'a' ) , 'http://example.com' , 34 ) ;
819
792
assert . deepEqual ( window . send . lastCall . args , [ {
820
- message : new Array ( 151 ) . join ( 'a' ) + '\u2026 at ' ,
793
+ message : 'TypeError: ' + new Array ( 140 ) . join ( 'a' ) + '\u2026' ,
821
794
exception : {
822
795
type : 'TypeError' ,
823
796
value : new Array ( 151 ) . join ( 'a' ) + '\u2026'
824
797
} ,
825
798
stacktrace : {
826
799
frames : [ {
827
800
filename : 'http://example.com' ,
828
- lineno : [ ] ,
801
+ lineno : 34 ,
829
802
in_app : true
830
803
} ]
831
804
} ,
@@ -1204,7 +1177,7 @@ describe('globals', function() {
1204
1177
}]
1205
1178
},
1206
1179
culprit: 'http://example.com',
1207
- message: 'crap at 10 ',
1180
+ message: 'Error: crap ',
1208
1181
foo: 'bar'
1209
1182
}]);
1210
1183
*/
0 commit comments