Skip to content

Conversation

@jkzing
Copy link
Contributor

@jkzingjkzing commented Jul 16, 2017

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

This is a PR from JSConf CN Code & Learn workshop. 👻

@nodejs-github-botnodejs-github-bot added async_hooks Issues and PRs related to the async hooks subsystem. test Issues and PRs related to the tests. labels Jul 16, 2017
@jkzingjkzing changed the title [Code & Learn] test: use template string literals in test-graph.tls-write.jstest: use template string literals in test-graph.tls-write.jsJul 16, 2017
@joyeecheungjoyeecheung added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Jul 16, 2017
Copy link
Member

@TrottTrott left a comment

Choose a reason for hiding this comment

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

LGTM if CI is green

@TimothyGuTimothyGu added code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. and removed code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. labels Jul 16, 2017
@vsemozhetbyt
Copy link
Contributor

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry to throw a wrench, and this should be path.join

Copy link
Member

@tniessentniessenJul 16, 2017

Choose a reason for hiding this comment

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

We have had the same discussion in other PRs before, and we would have to change this in quite many files. It does not make it worse than it is :)

But I agree that we should use path.join, so if you want to change this... @jkzing

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Sure, no problem on that.
So if I touch string concatenation that used as path next time, path.join is preferred rather than template string syntax, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO is these cases path.join is much better:

  1. it's more correct — Windows uses \ while other OSs use /, and path.join handles that
  2. it's more expressive — you explicitly say "this is a path I'm working with here"
  3. more readable — a little bit easier to see the parts that are being joined

Copy link
Contributor

@refackrefack left a comment

Choose a reason for hiding this comment

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

💯
Thanks you!

@refack
Copy link
Contributor

@jkzing thank you very much for you contribution. "Change requests" are a normal part of the process. Personally I'm very happy you did follow up and made the code even better 🥇 Hope to see you contributing more.

@tniessentniessen self-assigned this Jul 16, 2017
@jkzing
Copy link
ContributorAuthor

jkzing commented Jul 16, 2017

@refack With pleasure. Code review makes our code better.😄

@Trott
Copy link
Member

Looks like something went wrong with a number of CI builds. We'll have to re-run this on CI, but unfortunately not right now, because it's got quite a large backlog of jobs at the moment.

@Trott
Copy link
Member

@Trott
Copy link
Member

Two test failures in CI are unrelated. CI can be considered green!

Copy link
Contributor

@trevnorristrevnorris left a comment

Choose a reason for hiding this comment

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

git title is too long. Please limit it to 50 characters. You can remove the file name. That's easy enough to see by looking at the commit stat.

@jkzingjkzing changed the title test: use template string literals in test-graph.tls-write.jstest: replace string concatenation with path.join in test-graph.tls-write.jsJul 18, 2017
@jkzing
Copy link
ContributorAuthor

@trevnorris done.

Copy link
Contributor

@trevnorristrevnorris left a comment

Choose a reason for hiding this comment

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

Thanks much

refack pushed a commit to refack/node that referenced this pull request Jul 19, 2017
PR-URL: nodejs#14272 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
@refack
Copy link
Contributor

Landed in 97008a7

@refackrefack closed this Jul 19, 2017
@jkzingjkzing deleted the replace-concat branch July 20, 2017 03:01
addaleax pushed a commit that referenced this pull request Jul 22, 2017
PR-URL: #14272 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
Fishrock123 pushed a commit that referenced this pull request Jul 24, 2017
PR-URL: #14272 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
@addaleaxaddaleax mentioned this pull request Jul 24, 2017
@addaleaxaddaleax mentioned this pull request Aug 2, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

async_hooksIssues and PRs related to the async hooks subsystem.code-and-learnIssues related to the Code-and-Learn events and PRs submitted during the events.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

14 participants

@jkzing@vsemozhetbyt@refack@Trott@trevnorris@jasnell@cjihrig@tniessen@gireeshpunathil@gibfahn@AndreasMadsen@TimothyGu@joyeecheung@nodejs-github-bot