-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
test: replace string concatenation with path.join in test-graph.tls-write.js #14272
Conversation
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.
LGTM if CI is green
@@ -20,8 +20,8 @@ hooks.enable(); | |||
// | |||
const server = tls | |||
.createServer({ | |||
cert: fs.readFileSync(common.fixturesDir + '/test_cert.pem'), | |||
key: fs.readFileSync(common.fixturesDir + '/test_key.pem') | |||
cert: fs.readFileSync(`${common.fixturesDir}/test_cert.pem`), |
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.
Sorry to throw a wrench, and this should be path.join
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.
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
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.
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?
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.
IMHO is these cases path.join
is much better:
- it's more correct — Windows uses
\
while other OSs use/
, andpath.join
handles that - it's more expressive — you explicitly say "this is a path I'm working with here"
- more readable — a little bit easier to see the parts that are being joined
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.
💯
Thanks you!
@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. |
@refack With pleasure. Code review makes our code better.😄 |
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. |
Two test failures in CI are unrelated. CI can be considered green! |
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.
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.
@trevnorris done. |
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.
Thanks much
PR-URL: nodejs#14272 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Landed in 97008a7 |
PR-URL: #14272 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: #14272 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test
This is a PR from JSConf CN Code & Learn workshop. 👻