@@ -689,7 +689,7 @@ describe('globals', function() {
689689 frames : framesFlipped
690690 } ,
691691 culprit : 'http://example.com/file1.js' ,
692- message : 'lol at 10 '
692+ message : 'Error: lol '
693693 } ] ) ;
694694
695695 processException ( 'Error' , 'lol' , '' , 10 , frames . slice ( 0 ) , { } ) ;
@@ -702,7 +702,7 @@ describe('globals', function() {
702702 frames : framesFlipped
703703 } ,
704704 culprit : 'http://example.com/file1.js' ,
705- message : 'lol at 10 '
705+ message : 'Error: lol '
706706 } ] ) ;
707707
708708 processException ( 'Error' , 'lol' , '' , 10 , frames . slice ( 0 ) , { extra : 'awesome' } ) ;
@@ -715,7 +715,7 @@ describe('globals', function() {
715715 frames : framesFlipped
716716 } ,
717717 culprit : 'http://example.com/file1.js' ,
718- message : 'lol at 10 ' ,
718+ message : 'Error: lol ' ,
719719 extra : 'awesome'
720720 } ] ) ;
721721 } ) ;
@@ -737,7 +737,7 @@ describe('globals', function() {
737737 } ]
738738 } ,
739739 culprit : 'http://example.com/override.js' ,
740- message : 'lol at 10 '
740+ message : 'Error: lol '
741741 } ] ) ;
742742
743743 processException ( 'Error' , 'lol' , 'http://example.com/override.js' , 10 , [ ] , { } ) ;
@@ -754,7 +754,7 @@ describe('globals', function() {
754754 } ]
755755 } ,
756756 culprit : 'http://example.com/override.js' ,
757- message : 'lol at 10'
757+ message : 'Error: lol' ,
758758 } ] ) ;
759759
760760 processException ( 'Error' , 'lol' , 'http://example.com/override.js' , 10 , [ ] , { extra : 'awesome' } ) ;
@@ -771,21 +771,11 @@ describe('globals', function() {
771771 } ]
772772 } ,
773773 culprit : 'http://example.com/override.js' ,
774- message : 'lol at 10 ' ,
774+ message : 'Error: lol ' ,
775775 extra : 'awesome'
776776 } ] ) ;
777777 } ) ;
778778
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-
789779 it ( 'should not blow up with `undefined` message' , function ( ) {
790780 this . sinon . stub ( window , 'send' ) ;
791781
@@ -796,36 +786,19 @@ describe('globals', function() {
796786 it ( 'should truncate messages to the specified length' , function ( ) {
797787 this . sinon . stub ( window , 'send' ) ;
798788
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-
816789 globalOptions . maxMessageLength = 150 ;
817790
818- processException ( 'TypeError' , new Array ( 500 ) . join ( 'a' ) , 'http://example.com' , [ ] ) ;
791+ processException ( 'TypeError' , new Array ( 500 ) . join ( 'a' ) , 'http://example.com' , 34 ) ;
819792 assert . deepEqual ( window . send . lastCall . args , [ {
820- message : new Array ( 151 ) . join ( 'a' ) + '\u2026 at ' ,
793+ message : 'TypeError: ' + new Array ( 140 ) . join ( 'a' ) + '\u2026' ,
821794 exception : {
822795 type : 'TypeError' ,
823796 value : new Array ( 151 ) . join ( 'a' ) + '\u2026'
824797 } ,
825798 stacktrace : {
826799 frames : [ {
827800 filename : 'http://example.com' ,
828- lineno : [ ] ,
801+ lineno : 34 ,
829802 in_app : true
830803 } ]
831804 } ,
@@ -1204,7 +1177,7 @@ describe('globals', function() {
12041177 }]
12051178 },
12061179 culprit: 'http://example.com',
1207- message: 'crap at 10 ',
1180+ message: 'Error: crap ',
12081181 foo: 'bar'
12091182 }]);
12101183 */
0 commit comments