-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix(reporter): Fix #2930 causing error stack not to be parsed correctly #2932
Conversation
@lusarz You have approved my changes, but there are a lot of unit tests failing in my push request and I guess i got it wrong. Did you already review the changes and problems? |
@doberkofler Seems like this pull request solve problem, don't know why these unit tests fails - I'll try to figure it out. |
@lusarz I noticed the failing unit tests but because most of them seem to be related to the the changes in 2.0, I did not feel as if I should just change them to “my” new behavior. |
lib/reporter.js
Outdated
@@ -9,7 +9,7 @@ var baseReporterDecoratorFactory = require('./reporters/base').decoratorFactory | |||
|
|||
var createErrorFormatter = function (config, emitter, SourceMapConsumer) { | |||
var basePath = config.basePath | |||
var urlRoot = config.urlRoot || '' | |||
var urlRoot = config.urlRoot !== '/' ? config.urlRoot : '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@doberkofler
What about:
var urlRoot = config.urlRoot === '/' ? '' : (config.urlRoot || '')
@lusarz Looks good to me. Just committed it to my fork to do some testing. |
@doberkofler
Which seems to be related with format of commit message. |
@lusarz I have changed the commit message and the Travis build now passed. |
@doberkofler Seems that no authorized person has time to look at this :( |
Since this pr is merged, appveyor build should works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a test for this please
@dignifiedquire I've added a unit test |
Thank you |
@dignifiedquire Can I please for release into npm with this pull request? |
Fixed a problem when config.urlRoot is set to '/' causing the error stack not to be parsed correctly and therefore source maps are not used.