@@ -20,6 +20,15 @@ describe('ErrorStackParser', function () {
2020 expect ( stackFrames [ 2 ] ) . toMatchStackFrame ( [ 'bar' , undefined , 'http://path/to/file.js' , 108 , 107 ] ) ;
2121 } ) ;
2222
23+ it ( 'should parse Safari 8 Error.stack' , function ( ) {
24+ var stackFrames = unit . parse ( CapturedExceptions . SAFARI_8 ) ;
25+ expect ( stackFrames ) . toBeTruthy ( ) ;
26+ expect ( stackFrames . length ) . toBe ( 3 ) ;
27+ expect ( stackFrames [ 0 ] ) . toMatchStackFrame ( [ undefined , undefined , 'http://path/to/file.js' , 47 , 22 ] ) ;
28+ expect ( stackFrames [ 1 ] ) . toMatchStackFrame ( [ 'foo' , undefined , 'http://path/to/file.js' , 52 , 15 ] ) ;
29+ expect ( stackFrames [ 2 ] ) . toMatchStackFrame ( [ 'bar' , undefined , 'http://path/to/file.js' , 108 , 23 ] ) ;
30+ } ) ;
31+
2332 it ( 'should parse Firefox 31 Error.stack' , function ( ) {
2433 var stackFrames = unit . parse ( CapturedExceptions . FIREFOX_31 ) ;
2534 expect ( stackFrames ) . toBeTruthy ( ) ;
@@ -54,6 +63,15 @@ describe('ErrorStackParser', function () {
5463 expect ( stackFrames [ 2 ] ) . toMatchStackFrame ( [ 'bar' , undefined , 'http://path/to/file.js' , 82 , 1 ] ) ;
5564 } ) ;
5665
66+ it ( 'should parse IE 11 Error stacks' , function ( ) {
67+ var stackFrames = unit . parse ( CapturedExceptions . IE_11 ) ;
68+ expect ( stackFrames ) . toBeTruthy ( ) ;
69+ expect ( stackFrames . length ) . toBe ( 3 ) ;
70+ expect ( stackFrames [ 0 ] ) . toMatchStackFrame ( [ undefined , undefined , 'http://path/to/file.js' , 47 , 21 ] ) ;
71+ expect ( stackFrames [ 1 ] ) . toMatchStackFrame ( [ 'foo' , undefined , 'http://path/to/file.js' , 45 , 13 ] ) ;
72+ expect ( stackFrames [ 2 ] ) . toMatchStackFrame ( [ 'bar' , undefined , 'http://path/to/file.js' , 108 , 1 ] ) ;
73+ } ) ;
74+
5775 it ( 'should parse Opera 9.27 Error messages' , function ( ) {
5876 var stackFrames = unit . parse ( CapturedExceptions . OPERA_927 ) ;
5977 expect ( stackFrames ) . toBeTruthy ( ) ;
@@ -85,5 +103,14 @@ describe('ErrorStackParser', function () {
85103 expect ( stackFrames [ 2 ] ) . toMatchStackFrame ( [ 'foo' , undefined , 'http://path/to/file.js' , 11 ] ) ;
86104 expect ( stackFrames [ 3 ] ) . toMatchStackFrame ( [ undefined , undefined , 'http://path/to/file.js' , 15 ] ) ;
87105 } ) ;
106+
107+ it ( 'should parse Opera 25 Error stacks' , function ( ) {
108+ var stackFrames = unit . parse ( CapturedExceptions . OPERA_25 ) ;
109+ expect ( stackFrames ) . toBeTruthy ( ) ;
110+ expect ( stackFrames . length ) . toBe ( 3 ) ;
111+ expect ( stackFrames [ 0 ] ) . toMatchStackFrame ( [ undefined , undefined , 'http://path/to/file.js' , 47 , 22 ] ) ;
112+ expect ( stackFrames [ 1 ] ) . toMatchStackFrame ( [ 'foo' , undefined , 'http://path/to/file.js' , 52 , 15 ] ) ;
113+ expect ( stackFrames [ 2 ] ) . toMatchStackFrame ( [ 'bar' , undefined , 'http://path/to/file.js' , 108 , 168 ] ) ;
114+ } ) ;
88115 } ) ;
89116} ) ;
0 commit comments