@@ -123,6 +123,7 @@ describe('TraceKit', function () {
123
123
assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://localhost:8080/file.js' , func : 'I.e.fn.(anonymous function) [as index]' , args : [ ] , line : 10 , column : 3651 } ) ;
124
124
} ) ;
125
125
126
+
126
127
it ( 'should parse Chrome error with webpack URLs' , function ( ) {
127
128
var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . CHROME_XX_WEBPACK ) ;
128
129
assert . ok ( stackFrames ) ;
@@ -133,6 +134,17 @@ describe('TraceKit', function () {
133
134
assert . deepEqual ( stackFrames . stack [ 3 ] , { url : 'webpack:///./~/react-proxy/modules/createPrototypeProxy.js?' , func : 'TESTTESTTEST.proxiedMethod' , args : [ ] , line : 44 , column : 30 } ) ;
134
135
} ) ;
135
136
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
+
136
148
it ( 'should parse Chrome error with blob URLs' , function ( ) {
137
149
var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . CHROME_48_BLOB ) ;
138
150
assert . ok ( stackFrames ) ;
@@ -226,6 +238,18 @@ describe('TraceKit', function () {
226
238
assert . deepEqual ( stackFrames . stack . length , 3 ) ;
227
239
assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'resource://path/data/content/bundle.js' , func : 'render' , args : [ ] , line : 5529 , column : 16 } ) ;
228
240
} ) ;
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
+
229
253
it ( 'should parse React Native errors on Android' , function ( ) {
230
254
var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . ANDROID_REACT_NATIVE ) ;
231
255
assert . ok ( stackFrames ) ;
0 commit comments