-
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): keep users exact formatError result #2627
Conversation
@levithomason can you fix tests Thanks |
@levithomason also it would be nice to write test on this problem |
Sure thing. This was an in browser patch. I'll come back and give a proper update. |
I've updated the failing test. I went to add an additional test, however, it will only duplicate the existing test as it will ensure no new line is added to the |
LGTM |
Odd failures on CI. Can someone retrigger please? Travis:
|
I should note that |
@maksimr would you happen to have rights to retry tests on CI? Perhaps without cache if available? |
@levithomason only on travis and I have restarted it |
I appreciate it. |
@levithomason can you rebase onto master please, then all linting issues should be fixed and ci hopefully happy |
Rebased and pushed. Lint and tests pass locally. Travis looks like it will pass.
|
I restarted appveyor lets see if that helps |
Looks like we're good to go here. Thanks for the restart. |
@dignifiedquire bump |
Thank you |
Nice |
Awesome, thanks much. Can't wait to use this. |
I wrote this feature originally and haven't had time to come back and address this issue until now. See #2119 (comment).
Fixes #2626
The main purpose of the
formatError
function, per the docs, is to trim down the stack trace. However, no matter the return value configured, a new line is always appended. This means even when lines are removed a blank new line is still added. This results in large, blank, stack traces:This PR simply returns the exact value the user has configured in their
formatError
function, without appending a newline to it. This allows for removing lines from the stack trace: