@@ -56,21 +56,23 @@ describe('TraceKit', function(){
56
56
// named functions and anonymous functions
57
57
var stack_str = "" +
58
58
" Error: \n" +
59
- " at namedFunc0 (http://example.com/js/script.js:10)\n" + // stack[0]
60
- " at http://example.com/js/test.js:65\n" + // stack[1]
61
- " at namedFunc2 (http://example.com/js/script.js:20)\n" + // stack[2]
62
- " at http://example.com/js/test.js:67\n" + // stack[3]
63
- " at namedFunc4 (http://example.com/js/script.js:100001)" ; // stack[4]
59
+ " at new <anonymous> (http://example.com/js/test.js:63)\n" + // stack[0]
60
+ " at namedFunc0 (http://example.com/js/script.js:10)\n" + // stack[1]
61
+ " at http://example.com/js/test.js:65\n" + // stack[2]
62
+ " at namedFunc2 (http://example.com/js/script.js:20)\n" + // stack[3]
63
+ " at http://example.com/js/test.js:67\n" + // stack[4]
64
+ " at namedFunc4 (http://example.com/js/script.js:100001)" ; // stack[5]
64
65
var mock_err = { stack : stack_str } ;
65
66
var trace = TraceKit . computeStackTrace . computeStackTraceFromStackProp ( mock_err ) ;
66
67
67
68
// Make sure TraceKit didn't remove the anonymous functions
68
69
// from the stack like it used to :)
69
- assert . equal ( trace . stack [ 0 ] . func , 'namedFunc0' ) ;
70
- assert . equal ( trace . stack [ 1 ] . func , '?' ) ;
71
- assert . equal ( trace . stack [ 2 ] . func , 'namedFunc2' ) ;
72
- assert . equal ( trace . stack [ 3 ] . func , '?' ) ;
73
- assert . equal ( trace . stack [ 4 ] . func , 'namedFunc4' ) ;
70
+ assert . equal ( trace . stack [ 0 ] . func , 'new <anonymous>' ) ;
71
+ assert . equal ( trace . stack [ 1 ] . func , 'namedFunc0' ) ;
72
+ assert . equal ( trace . stack [ 2 ] . func , '?' ) ;
73
+ assert . equal ( trace . stack [ 3 ] . func , 'namedFunc2' ) ;
74
+ assert . equal ( trace . stack [ 4 ] . func , '?' ) ;
75
+ assert . equal ( trace . stack [ 5 ] . func , 'namedFunc4' ) ;
74
76
} ) ;
75
77
} ) ;
76
78
describe ( 'error notifications' , function ( ) {
0 commit comments