-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
[JsConf Code & Learn]test: replace string concatenation with template literals #14322
Conversation
test/parallel/test-icu-data-dir.js
Outdated
@@ -7,8 +7,8 @@ const assert = require('assert'); | |||
const { spawnSync } = require('child_process'); | |||
|
|||
const expected = | |||
'could not initialize ICU (check NODE_ICU_DATA or ' + | |||
'--icu-data-dir parameters)' + (common.isWindows ? '\r\n' : '\n'); | |||
`could not initialize ICU (check NODE_ICU_DATA or ` + |
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.
This change is not necessary.
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.
ok, thks for suggestion.
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 for submitting this PR! The change in line 10 is not needed. The change in line 11 looks good to me, although I left a comment suggesting something that might be a bit better still. Can you update the PR at least to remove the changes in line 10?
test/parallel/test-icu-data-dir.js
Outdated
'could not initialize ICU (check NODE_ICU_DATA or ' + | ||
'--icu-data-dir parameters)' + (common.isWindows ? '\r\n' : '\n'); | ||
`could not initialize ICU (check NODE_ICU_DATA or ` + | ||
`--icu-data-dir parameters)${common.isWindows ? '\r\n' : '\n'}`; |
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.
This might be slightly better as:
`--icu-data-dir parameters)${os.EOL}`;
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.
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.
Thks, I submit the new PR in #14342
@nathansmile Did you intentionally close this PR? It seems like you force-pushed the upstream master branch instead of your changes. |
When I'm updating the code, I don't want to add a new commit, or there will be 2 commits for this issue (I think it's not necessary). So I hard reset and force push the branch to my origin branch. After that I found this PR closed by me. What a surprise! Then I submit another PR. |
@nathansmile If you want to just update the last commit in a branch, you can try: git checkout your-branch
(do the change)
git commit --amend
(change the commit message if needed)
git push --force-with-lease The last commit will be updated in the PR automatically. |
FWIW I think once you push a new commit onto the branch you can reopen the PR. The easier fix is not to push between resetting and making the new commit. |
@vsemozhetbyt Thanks a lot~ That is what I need. |
replace string concatenation in test/parallel/test-icu-data-dir.js with template literals
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)