File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 18
18
19
19
<!-- Mocking -->
20
20
< script src ="../../node_modules/sinon/pkg/sinon.js "> </ script >
21
- < script src ="../../dist /raven.js "> </ script >
21
+ < script src ="../../build /raven.js "> </ script >
22
22
< script >
23
23
beforeEach ( function ( ) {
24
24
this . sinon = sinon . sandbox . create ( ) ;
Original file line number Diff line number Diff line change @@ -78,6 +78,29 @@ describe('integration', function () {
78
78
}
79
79
) ;
80
80
} ) ;
81
+
82
+ it ( 'should capture an Error object passed to Raven.captureException w/ maxMessageLength set (#647)' , function ( done ) {
83
+ var iframe = this . iframe ;
84
+ iframeExecute ( iframe , done ,
85
+ function ( ) {
86
+ setTimeout ( done ) ;
87
+
88
+ Raven . _globalOptions . maxMessageLength = 100 ;
89
+ Raven . captureException ( new Error ( 'lol' ) , {
90
+ level : 'warning' ,
91
+ extra : {
92
+ foo : 'bar'
93
+ }
94
+ } ) ;
95
+ } ,
96
+ function ( ) {
97
+ var ravenData = iframe . contentWindow . ravenData [ 0 ] ;
98
+ assert . equal ( ravenData . exception . type , 'Error' ) ;
99
+ assert . equal ( ravenData . exception . value , 'lol' ) ;
100
+ assert . equal ( ravenData . exception . values [ 0 ] . stacktrace . frames . length , 1 ) ;
101
+ }
102
+ ) ;
103
+ } ) ;
81
104
} ) ;
82
105
83
106
describe ( 'window.onerror' , function ( ) {
You can’t perform that action at this time.
0 commit comments