@@ -123,6 +123,7 @@ describe('TraceKit', function () {
123123 assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://localhost:8080/file.js' , func : 'I.e.fn.(anonymous function) [as index]' , args : [ ] , line : 10 , column : 3651 } ) ;
124124 } ) ;
125125
126+
126127 it ( 'should parse Chrome error with webpack URLs' , function ( ) {
127128 var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . CHROME_XX_WEBPACK ) ;
128129 assert . ok ( stackFrames ) ;
@@ -133,6 +134,17 @@ describe('TraceKit', function () {
133134 assert . deepEqual ( stackFrames . stack [ 3 ] , { url : 'webpack:///./~/react-proxy/modules/createPrototypeProxy.js?' , func : 'TESTTESTTEST.proxiedMethod' , args : [ ] , line : 44 , column : 30 } ) ;
134135 } ) ;
135136
137+ it ( 'should parse nested eval() from Chrome' , function ( ) {
138+ var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . CHROME_48_EVAL ) ;
139+ assert . ok ( stackFrames ) ;
140+ assert . deepEqual ( stackFrames . stack . length , 5 ) ;
141+ assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'http://localhost:8080/file.js' , func : 'baz' , args : [ ] , line : 21 , column : 17 } ) ;
142+ assert . deepEqual ( stackFrames . stack [ 1 ] , { url : 'http://localhost:8080/file.js' , func : 'foo' , args : [ ] , line : 21 , column : 17 } ) ;
143+ assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://localhost:8080/file.js' , func : 'eval' , args : [ ] , line : 21 , column : 17 } ) ;
144+ assert . deepEqual ( stackFrames . stack [ 3 ] , { url : 'http://localhost:8080/file.js' , func : 'Object.speak' , args : [ ] , line : 21 , column : 17 } ) ;
145+ assert . deepEqual ( stackFrames . stack [ 4 ] , { url : 'http://localhost:8080/file.js' , func : '?' , args : [ ] , line : 31 , column : 13 } ) ;
146+ } ) ;
147+
136148 it ( 'should parse Chrome error with blob URLs' , function ( ) {
137149 var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . CHROME_48_BLOB ) ;
138150 assert . ok ( stackFrames ) ;
@@ -226,6 +238,18 @@ describe('TraceKit', function () {
226238 assert . deepEqual ( stackFrames . stack . length , 3 ) ;
227239 assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'resource://path/data/content/bundle.js' , func : 'render' , args : [ ] , line : 5529 , column : 16 } ) ;
228240 } ) ;
241+
242+ it ( 'should parse Firefox errors with eval URLs' , function ( ) {
243+ var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . FIREFOX_43_EVAL ) ;
244+ assert . ok ( stackFrames ) ;
245+ assert . deepEqual ( stackFrames . stack . length , 5 ) ;
246+ assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'http://localhost:8080/file.js' , func : 'baz' , args :[ ] , line : 26 , column : null } ) ;
247+ assert . deepEqual ( stackFrames . stack [ 1 ] , { url : 'http://localhost:8080/file.js' , func : 'foo' , args :[ ] , line : 26 , column : null } ) ;
248+ assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://localhost:8080/file.js' , func : '?' , args :[ ] , line : 26 , column : null } ) ;
249+ assert . deepEqual ( stackFrames . stack [ 3 ] , { url : 'http://localhost:8080/file.js' , func : 'speak' , args :[ ] , line : 26 , column : 17 } ) ;
250+ assert . deepEqual ( stackFrames . stack [ 4 ] , { url : 'http://localhost:8080/file.js' , func : '?' , args :[ ] , line : 33 , column : 9 } ) ;
251+ } ) ;
252+
229253 it ( 'should parse React Native errors on Android' , function ( ) {
230254 var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . ANDROID_REACT_NATIVE ) ;
231255 assert . ok ( stackFrames ) ;
0 commit comments