File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 1818
1919 <!-- Mocking -->
2020 < script src ="../../node_modules/sinon/pkg/sinon.js "> </ script >
21- < script src ="../../dist /raven.js "> </ script >
21+ < script src ="../../build /raven.js "> </ script >
2222 < script >
2323 beforeEach ( function ( ) {
2424 this . sinon = sinon . sandbox . create ( ) ;
Original file line number Diff line number Diff line change @@ -78,6 +78,29 @@ describe('integration', function () {
7878 }
7979 ) ;
8080 } ) ;
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+ } ) ;
81104 } ) ;
82105
83106 describe ( 'window.onerror' , function ( ) {
You can’t perform that action at this time.
0 commit comments