Skip to content
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

Support util.inspect.custom with fixing #3985 #4085

Closed
wants to merge 4 commits into from

Conversation

KRAhn
Copy link

@KRAhn KRAhn commented Oct 26, 2019

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions.

Description of the Change

There are two sub issues in the issue #3985

  1. Fixing a sequence of error generator of lib/reporters/base.js
  • As Is
    1 - message
    2 - inspect()
    3 - empty string
  • To be
    1 - inspect()
    2 - message
    3 - empty string
  1. Supporting util.inspect.custom(), which seems standard of nodejs for representing an object for debugging purpose, and use it first when generating an error message. (https://nodejs.org/api/util.html#util_util_inspect_custom)

This PR resolves those issues.

Benefits

Making developers have more autonomy when they make error message.

Possible Drawbacks

Fragmentation of a way to generate error message.
I think we can take it because util.inspect.custom is general way to make representative string of object.
But hope no fragmentation anymore.

@jsf-clabot
Copy link

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

@KRAhn KRAhn closed this Oct 26, 2019
@KRAhn
Copy link
Author

KRAhn commented Oct 26, 2019

I’m gonna reopen it after fixing build issue.

@KRAhn KRAhn reopened this Oct 26, 2019
@KRAhn KRAhn closed this Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants