@@ -116,6 +116,20 @@ describe('ErrorStackParser', function() {
116116 expect ( stackFrames [ 4 ] ) . toMatchStackFrame ( [ undefined , undefined , 'http://localhost:8080/file.js' , 31 , 13 ] ) ;
117117 } ) ;
118118
119+ it ( 'should parse and set eval origin for eval() from V8' , function ( ) {
120+ var stackFrames = unit . parse ( CapturedExceptions . CHROME_58_EVAL ) ;
121+ expect ( stackFrames ) . toBeTruthy ( ) ;
122+ expect ( stackFrames . length ) . toBe ( 6 ) ;
123+ expect ( stackFrames [ 0 ] ) . toMatchStackFrame ( [ 'willThrow' , undefined , 'index.js' , 11 , undefined ] ) ;
124+ expect ( stackFrames [ 0 ] . getEvalOrigin ( ) ) . toMatchStackFrame ( [ 'eval' , undefined , '<anonymous>' , 3 , 3 ] ) ;
125+ expect ( stackFrames [ 1 ] ) . toMatchStackFrame ( [ 'eval' , undefined , 'index.js' , 11 , undefined ] ) ;
126+ expect ( stackFrames [ 1 ] . getEvalOrigin ( ) ) . toMatchStackFrame ( [ 'eval' , undefined , '<anonymous>' , 6 , 1 ] ) ;
127+ expect ( stackFrames [ 2 ] ) . toMatchStackFrame ( [ 'h' , undefined , 'index.js' , 11 , undefined ] ) ;
128+ expect ( stackFrames [ 3 ] ) . toMatchStackFrame ( [ 'g' , undefined , 'index.js' , 6 , undefined ] ) ;
129+ expect ( stackFrames [ 4 ] ) . toMatchStackFrame ( [ 'f' , undefined , 'index.js' , 2 , undefined ] ) ;
130+ expect ( stackFrames [ 5 ] ) . toMatchStackFrame ( [ undefined , undefined , 'index.js' , 23 , undefined ] ) ;
131+ } ) ;
132+
119133 it ( 'should parse IE 10 Error stacks' , function ( ) {
120134 var stackFrames = unit . parse ( CapturedExceptions . IE_10 ) ;
121135 expect ( stackFrames ) . toBeTruthy ( ) ;
0 commit comments