-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Karma-jasmine adapter mangles stack traces from Zone.js (occasionally) #120
Comments
This also happens for some errors thrown by angularjs. The most common time I've seen it is when a module is referenced but never defined. The result is the same, the actual message should be:
It gets truncated down to this:
I've found that If it helps, I've created a repo here: https://github.com/ccurrens/angular-seed-phantomjsbug that can reproduce the bug every test run. You can run |
@ccurrens thanks! |
The Karma reporter's
formatFailedStep
function is turning decent errors with my stack which includes Zone.js into a useless clip. This is because of the processing heuristics for PhantomJS stack traces.My original
step
has message:and stack:
But after Karma process, the output is
The offending issue seems to be that we trigger this line (
karma-jasmine/src/adapter.js
Line 85 in ec27b12
XMLHttpRequest.ZoneTask.invoke (http://localhost:9876/base/node_modules/angular2/bundles/angular2-polyfills.js:452:22)
appears in both the message and the stack.It seems like the heuristic should be to remove the original step's message only if the ENTIRE thing appears in the stack trace, instead of just one line.
The text was updated successfully, but these errors were encountered: