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

url, test: fix typo in inspect output, add test #10231

Closed
wants to merge 1 commit into from

Conversation

jaybrownlee
Copy link

@jaybrownlee jaybrownlee commented Dec 12, 2016

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

In the string returned from URL.inspect there was an extra semicolon
at the end when showHidden === true. The semicolon has been
removed and a test for the inspect function has been added. The test
parses the returned string, validates all of the contained keys/values
and tests logic related to the showHidden option.

@nodejs-github-bot nodejs-github-bot added the url Issues and PRs related to the legacy built-in url module. label Dec 12, 2016
@italoacasas italoacasas added the test Issues and PRs related to the tests. label Dec 12, 2016
Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! This LGTM if CI is green and @jasnell and/or @joyeecheung are happy with it

CI: https://ci.nodejs.org/job/node-test-commit/6601/

@joyeecheung
Copy link
Member

Got a surprised ping here. Can I review this even if I am not a collaborator?

@addaleax
Copy link
Member

@joyeecheung Don’t feel obligated to do anything here! It’s just that I’d feel more comfortable with somebody reviewing this who has a bit more experience with the url.URL tests than I do, and I think you have done one or two non-trivial PRs around those? (@jasnell would be the obvious choice here, but sometimes people are busy :P)

And to answer your question, yes, you can – PRs still need to be approved by at least one collaborator, but that does not mean that input from others can’t just be as valuable.

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits.

const v = line.slice(i + 2);
if (keys.has(k)) {
common.fail('duplicate key found: ' + k);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits: Would you mind changing this to assert.strictEqual(keys.has(k), false, 'duplicate key found: ' + k)? Just like what you did on L195.

@jaybrownlee
Copy link
Author

@joyeecheung Good suggestion. I made the change, PTAL.

@addaleax
Copy link
Member

One final thing: Could you wrap the commit message body at 72 columns? Otherwise this should be ready to land, and if you prefer, the person landing this can take care of that for you.

In the string returned from URL.inspect there was an extra semicolon
at the end when showHidden === true. The semicolon has been
removed and a test for the inspect function has been added. The test
parses the returned string, validates all of the contained keys/values
and tests logic related to the showHidden option.
@jaybrownlee
Copy link
Author

Commit message fixed, wrapped at 72.

@addaleax
Copy link
Member

Great, thanks! Landed in 4f97a14 🎉

@addaleax addaleax closed this Dec 14, 2016
Trott pushed a commit to Trott/io.js that referenced this pull request Dec 14, 2016
In the string returned from URL.inspect there was an extra semicolon
at the end when showHidden === true. The semicolon has been
removed and a test for the inspect function has been added. The test
parses the returned string, validates all of the contained keys/values
and tests logic related to the showHidden option.

PR-URL: nodejs#10231
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
evanlucas pushed a commit that referenced this pull request Dec 14, 2016
In the string returned from URL.inspect there was an extra semicolon
at the end when showHidden === true. The semicolon has been
removed and a test for the inspect function has been added. The test
parses the returned string, validates all of the contained keys/values
and tests logic related to the showHidden option.

PR-URL: #10231
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
@italoacasas italoacasas mentioned this pull request Dec 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests. url Issues and PRs related to the legacy built-in url module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants